Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use a more straightforward return value #9519

Merged
merged 1 commit into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading