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

misc: fix incorrect inclusion of nil err in various formatted strings #9442

Merged
merged 2 commits into from
Jan 26, 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
7 changes: 6 additions & 1 deletion lnrpc/routerrpc/router_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1343,12 +1343,17 @@ func (s *Server) trackPayment(subscription routing.ControlTowerSubscriber,
err := s.trackPaymentStream(
stream.Context(), subscription, noInflightUpdates, stream.Send,
)
switch {
case err == nil:
return nil

// If the context is canceled, we don't return an error.
if errors.Is(err, context.Canceled) {
case errors.Is(err, context.Canceled):
log.Infof("Payment stream %v canceled", identifier)

return nil

default:
}

// Otherwise, we will log and return the error as the stream has
Expand Down
6 changes: 2 additions & 4 deletions lntest/harness_assertion.go
Original file line number Diff line number Diff line change
Expand Up @@ -1862,13 +1862,11 @@ func (h *HarnessTest) AssertChannelInGraphDB(hn *node.HarnessNode,
// Make sure the policies are populated, otherwise this edge
// cannot be used for routing.
if resp.Node1Policy == nil {
return fmt.Errorf("channel %s has no policy1: %w",
op, err)
return fmt.Errorf("channel %s has no policy1", op)
}

if resp.Node2Policy == nil {
return fmt.Errorf("channel %s has no policy2: %w",
op, err)
return fmt.Errorf("channel %s has no policy2", op)
}

edge = resp
Expand Down
Loading