Skip to content

Commit

Permalink
Merge pull request #9519 from fuyangpengqi/master
Browse files Browse the repository at this point in the history
refactor: use a more straightforward return value
  • Loading branch information
guggero authored Feb 28, 2025
2 parents 8532955 + 150f724 commit dfd43c9
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion channeldb/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion channeldb/migration32/mission_control_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions contractcourt/htlc_timeout_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ func (h *htlcTimeoutResolver) sweepTimeoutTx() error {
return err
}

return err
return nil
}

// resolveSecondLevelTxLegacy sends a second level timeout transaction to the
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lnrpc/invoicesrpc/addinvoice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,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.
Expand Down
2 changes: 1 addition & 1 deletion lnrpc/routerrpc/router_server_deprecated.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion routing/missioncontrol_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit dfd43c9

Please sign in to comment.