diff --git a/executor.go b/executor.go index 1707342..2775ea0 100644 --- a/executor.go +++ b/executor.go @@ -2,6 +2,7 @@ package loop import ( "context" + "errors" "fmt" "strings" "sync" @@ -159,7 +160,10 @@ func (s *executor) run(mainCtx context.Context, cancelSwap: s.executorConfig.cancelSwap, verifySchnorrSig: s.executorConfig.verifySchnorrSig, }, height) - if err != nil && err != context.Canceled { + if err != nil && !errors.Is( + err, context.Canceled, + ) { + log.Errorf("Execute error: %v", err) } diff --git a/loopd/daemon.go b/loopd/daemon.go index dfccb77..0acbb01 100644 --- a/loopd/daemon.go +++ b/loopd/daemon.go @@ -536,7 +536,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error { log.Info("Starting liquidity manager") err := d.liquidityMgr.Run(d.mainCtx) - if err != nil && err != context.Canceled { + if err != nil && !errors.Is(err, context.Canceled) { d.internalErrChan <- err } diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 470ac80..c42249f 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -510,7 +510,7 @@ func (s *swapClientServer) SwapInfo(_ context.Context, // LoopOutTerms returns the terms that the server enforces for loop out swaps. func (s *swapClientServer) LoopOutTerms(ctx context.Context, - req *clientrpc.TermsRequest) (*clientrpc.OutTermsResponse, error) { + _ *clientrpc.TermsRequest) (*clientrpc.OutTermsResponse, error) { log.Infof("Loop out terms request received") @@ -540,7 +540,9 @@ func (s *swapClientServer) LoopOutQuote(ctx context.Context, return nil, err } - publicactionDeadline := getPublicationDeadline(req.SwapPublicationDeadline) + publicactionDeadline := getPublicationDeadline( + req.SwapPublicationDeadline, + ) quote, err := s.impl.LoopOutQuote(ctx, &loop.LoopOutQuoteRequest{ Amount: btcutil.Amount(req.Amt), @@ -563,7 +565,7 @@ func (s *swapClientServer) LoopOutQuote(ctx context.Context, // GetLoopInTerms returns the terms that the server enforces for swaps. func (s *swapClientServer) GetLoopInTerms(ctx context.Context, - req *clientrpc.TermsRequest) (*clientrpc.InTermsResponse, error) { + _ *clientrpc.TermsRequest) (*clientrpc.InTermsResponse, error) { log.Infof("Loop in terms request received")