loopd: remove mainnet loop in block
@@ -6,8 +6,6 @@ import (
"fmt"
"sort"
- "github.com/btcsuite/btcd/chaincfg"
-
"github.com/lightningnetwork/lnd/queue"
"github.com/lightninglabs/loop"
@@ -20,10 +18,6 @@ import (
const completedSwapsCount = 5
-var (
- errNoMainnet = errors.New("function not available on mainnet")
-)
-
// swapClientServer implements the grpc service exposed by loopd.
type swapClientServer struct {
impl *loop.Client
@@ -268,10 +262,6 @@ func (s *swapClientServer) GetLoopInTerms(ctx context.Context, req *looprpc.Term
logger.Infof("Loop in terms request received")
- if s.lnd.ChainParams.Name == chaincfg.MainNetParams.Name {
- return nil, errNoMainnet
- }
-
terms, err := s.impl.LoopInTerms(ctx)
if err != nil {
logger.Errorf("Terms request: %v", err)
@@ -293,10 +283,6 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context,
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{
Amount: btcutil.Amount(req.Amt),
HtlcConfTarget: defaultConfTarget,
@@ -316,10 +302,6 @@ func (s *swapClientServer) LoopIn(ctx context.Context,
logger.Infof("Loop in request received")
- if s.lnd.ChainParams.Name == chaincfg.MainNetParams.Name {
- return nil, errNoMainnet
- }
-
req := &loop.LoopInRequest{
Amount: btcutil.Amount(in.Amt),
MaxMinerFee: btcutil.Amount(in.MaxMinerFee),
