mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-24 06:47:44 +01:00
Merge pull request #9442 from ellemouton/miscErrorFormats
misc: fix incorrect inclusion of nil err in various formatted strings
This commit is contained in:
commit
1ed76af179
2 changed files with 8 additions and 5 deletions
|
@ -1343,12 +1343,17 @@ func (s *Server) trackPayment(subscription routing.ControlTowerSubscriber,
|
||||||
err := s.trackPaymentStream(
|
err := s.trackPaymentStream(
|
||||||
stream.Context(), subscription, noInflightUpdates, stream.Send,
|
stream.Context(), subscription, noInflightUpdates, stream.Send,
|
||||||
)
|
)
|
||||||
|
switch {
|
||||||
|
case err == nil:
|
||||||
|
return nil
|
||||||
|
|
||||||
// If the context is canceled, we don't return an error.
|
// 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)
|
log.Infof("Payment stream %v canceled", identifier)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, we will log and return the error as the stream has
|
// Otherwise, we will log and return the error as the stream has
|
||||||
|
|
|
@ -1862,13 +1862,11 @@ func (h *HarnessTest) AssertChannelInGraphDB(hn *node.HarnessNode,
|
||||||
// Make sure the policies are populated, otherwise this edge
|
// Make sure the policies are populated, otherwise this edge
|
||||||
// cannot be used for routing.
|
// cannot be used for routing.
|
||||||
if resp.Node1Policy == nil {
|
if resp.Node1Policy == nil {
|
||||||
return fmt.Errorf("channel %s has no policy1: %w",
|
return fmt.Errorf("channel %s has no policy1", op)
|
||||||
op, err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if resp.Node2Policy == nil {
|
if resp.Node2Policy == nil {
|
||||||
return fmt.Errorf("channel %s has no policy2: %w",
|
return fmt.Errorf("channel %s has no policy2", op)
|
||||||
op, err)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
edge = resp
|
edge = resp
|
||||||
|
|
Loading…
Add table
Reference in a new issue