-
Notifications
You must be signed in to change notification settings - Fork 417
Improve logging of pathfinding behavior #2011
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
Changes from 7 commits
9073b8d
02dddb4
0312c2b
3cdb8ed
b6ac4ec
cfe611a
5bd7708
87eef3f
bb6c7f6
aef2aa6
4a2c289
a8781ca
0e5e8a6
3240053
b913098
8d2a85d
fe93ed8
6da0e06
78dbb77
0be98f5
c830123
9bc34a1
1969bb7
7febd5b
4364e18
34d21dc
592f615
c633d31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1270,6 +1270,12 @@ where L::Target: Logger { | |
// around again with a higher amount. | ||
if !contributes_sufficient_value || exceeds_max_path_length || | ||
exceeds_cltv_delta_limit || payment_failed_on_this_channel { | ||
if let Some(first_hops) = first_hops { // for only first hop it will log feedback | ||
for hop in first_hops { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With this you're logging every single first hop, independently of whether it was excluded or not. You rather should just log the current candidate if it matches one of the first hops. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where to find find current candidate in this code :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
let _channel_id = hop.channel_id; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You probably want to log via the |
||
} | ||
log_trace!(logger, "first Hop is excluded because unfulfilling condition"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be nice to know a) what hop was excluded and b) why exactly it was excluded. To this end it might make sense to break up the ORed bools above into individual |
||
} | ||
// Path isn't useful, ignore it and move on. | ||
} else if may_overpay_to_meet_path_minimum_msat { | ||
hit_minimum_limit = true; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you'd use
first_hop_targets
rather thanfirst_hops
, there would be no need for this unwrapping.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tnull But
first_hop_targets
doesn't haveshort_channel_id
field.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it does. It is a
HashMap
fromPublicKey
toChannelDetails
and the latter hasshort_channel_id
.