diff --git a/channeldb/channel.go b/channeldb/channel.go index f4e99a6f8c..6bf20373c6 100644 --- a/channeldb/channel.go +++ b/channeldb/channel.go @@ -3146,7 +3146,7 @@ func (c *OpenChannel) RemoteCommitChainTip() (*CommitDiff, error) { return nil, err } - return cd, err + return cd, nil } // UnsignedAckedUpdates retrieves the persisted unsigned acked remote log diff --git a/channeldb/migration32/mission_control_store.go b/channeldb/migration32/mission_control_store.go index 76463eb6ca..060bb2b9c3 100644 --- a/channeldb/migration32/mission_control_store.go +++ b/channeldb/migration32/mission_control_store.go @@ -738,7 +738,7 @@ func serializeNewResult(rp *paymentResultNew) ([]byte, []byte, error) { return nil, nil, err } - return key, buff.Bytes(), err + return key, buff.Bytes(), nil } // getResultKeyNew returns a byte slice representing a unique key for this diff --git a/contractcourt/htlc_timeout_resolver.go b/contractcourt/htlc_timeout_resolver.go index f2b9ba2b73..5b8536398f 100644 --- a/contractcourt/htlc_timeout_resolver.go +++ b/contractcourt/htlc_timeout_resolver.go @@ -487,7 +487,7 @@ func (h *htlcTimeoutResolver) sweepTimeoutTx() error { return err } - return err + return nil } // resolveSecondLevelTxLegacy sends a second level timeout transaction to the @@ -593,7 +593,7 @@ func (h *htlcTimeoutResolver) waitForConfirmedSpend(op *wire.OutPoint, return nil, err } - return spend, err + return spend, nil } // Stop signals the resolver to cancel any current resolution processes, and diff --git a/lnrpc/invoicesrpc/addinvoice_test.go b/lnrpc/invoicesrpc/addinvoice_test.go index 546b9cc725..4b99c893fd 100644 --- a/lnrpc/invoicesrpc/addinvoice_test.go +++ b/lnrpc/invoicesrpc/addinvoice_test.go @@ -5,7 +5,6 @@ import ( "fmt" "testing" - "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/wire" "github.com/lightningnetwork/lnd/channeldb" "github.com/lightningnetwork/lnd/graph/db/models" @@ -89,7 +88,7 @@ func (h *hopHintsConfigMock) FetchChannelEdgesByID(chanID uint64) ( policy2, ok := args.Get(2).(*models.ChannelEdgePolicy) require.True(h.t, ok) - return edgeInfo, policy1, policy2, err + return edgeInfo, policy1, policy2, nil } // getTestPubKey returns a valid parsed pub key to be used in our tests. diff --git a/lnrpc/routerrpc/router_server_deprecated.go b/lnrpc/routerrpc/router_server_deprecated.go index 7be1e3d919..a08cafcdd7 100644 --- a/lnrpc/routerrpc/router_server_deprecated.go +++ b/lnrpc/routerrpc/router_server_deprecated.go @@ -118,7 +118,7 @@ func (s *Server) SendToRoute(ctx context.Context, Failure: resp.Failure, } - return legacyResp, err + return legacyResp, nil } // QueryProbability returns the current success probability estimate for a diff --git a/routing/missioncontrol_store.go b/routing/missioncontrol_store.go index 5f4f521f5c..7398ca0dcc 100644 --- a/routing/missioncontrol_store.go +++ b/routing/missioncontrol_store.go @@ -186,7 +186,7 @@ func serializeResult(rp *paymentResult) ([]byte, []byte, error) { return nil, nil, err } - return key, buff.Bytes(), err + return key, buff.Bytes(), nil } // deserializeResult deserializes a payment result. diff --git a/routing/pathfind.go b/routing/pathfind.go index 3f1d0ba092..d822b388b1 100644 --- a/routing/pathfind.go +++ b/routing/pathfind.go @@ -12,7 +12,6 @@ import ( "github.com/btcsuite/btcd/btcutil" sphinx "github.com/lightningnetwork/lightning-onion" "github.com/lightningnetwork/lnd/feature" - "github.com/lightningnetwork/lnd/fn/v2" graphdb "github.com/lightningnetwork/lnd/graph/db" "github.com/lightningnetwork/lnd/graph/db/models" "github.com/lightningnetwork/lnd/lnutils" @@ -561,7 +560,7 @@ func getOutgoingBalance(node route.Vertex, outgoingChans map[uint64]struct{}, if err != nil { return 0, 0, err } - return max, total, err + return max, total, nil } // findPath attempts to find a path from the source node within the ChannelGraph