mirror of
https://github.com/lightninglabs/loop
synced 2024-11-11 13:11:12 +00:00
Merge pull request #64 from joostjager/remove-mainnet-block
loopd: remove mainnet loop in block
This commit is contained in:
commit
88ee52093a
@ -6,8 +6,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/btcsuite/btcd/chaincfg"
|
|
||||||
|
|
||||||
"github.com/lightningnetwork/lnd/queue"
|
"github.com/lightningnetwork/lnd/queue"
|
||||||
|
|
||||||
"github.com/lightninglabs/loop"
|
"github.com/lightninglabs/loop"
|
||||||
@ -20,10 +18,6 @@ import (
|
|||||||
|
|
||||||
const completedSwapsCount = 5
|
const completedSwapsCount = 5
|
||||||
|
|
||||||
var (
|
|
||||||
errNoMainnet = errors.New("function not available on mainnet")
|
|
||||||
)
|
|
||||||
|
|
||||||
// swapClientServer implements the grpc service exposed by loopd.
|
// swapClientServer implements the grpc service exposed by loopd.
|
||||||
type swapClientServer struct {
|
type swapClientServer struct {
|
||||||
impl *loop.Client
|
impl *loop.Client
|
||||||
@ -268,10 +262,6 @@ func (s *swapClientServer) GetLoopInTerms(ctx context.Context, req *looprpc.Term
|
|||||||
|
|
||||||
logger.Infof("Loop in terms request received")
|
logger.Infof("Loop in terms request received")
|
||||||
|
|
||||||
if s.lnd.ChainParams.Name == chaincfg.MainNetParams.Name {
|
|
||||||
return nil, errNoMainnet
|
|
||||||
}
|
|
||||||
|
|
||||||
terms, err := s.impl.LoopInTerms(ctx)
|
terms, err := s.impl.LoopInTerms(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Errorf("Terms request: %v", err)
|
logger.Errorf("Terms request: %v", err)
|
||||||
@ -293,10 +283,6 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context,
|
|||||||
|
|
||||||
logger.Infof("Loop in quote request received")
|
logger.Infof("Loop in quote request received")
|
||||||
|
|
||||||
if s.lnd.ChainParams.Name == chaincfg.MainNetParams.Name {
|
|
||||||
return nil, errNoMainnet
|
|
||||||
}
|
|
||||||
|
|
||||||
quote, err := s.impl.LoopInQuote(ctx, &loop.LoopInQuoteRequest{
|
quote, err := s.impl.LoopInQuote(ctx, &loop.LoopInQuoteRequest{
|
||||||
Amount: btcutil.Amount(req.Amt),
|
Amount: btcutil.Amount(req.Amt),
|
||||||
HtlcConfTarget: defaultConfTarget,
|
HtlcConfTarget: defaultConfTarget,
|
||||||
@ -316,10 +302,6 @@ func (s *swapClientServer) LoopIn(ctx context.Context,
|
|||||||
|
|
||||||
logger.Infof("Loop in request received")
|
logger.Infof("Loop in request received")
|
||||||
|
|
||||||
if s.lnd.ChainParams.Name == chaincfg.MainNetParams.Name {
|
|
||||||
return nil, errNoMainnet
|
|
||||||
}
|
|
||||||
|
|
||||||
req := &loop.LoopInRequest{
|
req := &loop.LoopInRequest{
|
||||||
Amount: btcutil.Amount(in.Amt),
|
Amount: btcutil.Amount(in.Amt),
|
||||||
MaxMinerFee: btcutil.Amount(in.MaxMinerFee),
|
MaxMinerFee: btcutil.Amount(in.MaxMinerFee),
|
||||||
|
Loading…
Reference in New Issue
Block a user