-
Notifications
You must be signed in to change notification settings - Fork 42
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
Use remote fee policy when constructing route hints #1000
Conversation
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.
One comment. I like that listchannels
call where the local node is the destination. Smart.
fees_base_msat: fees_base_msat.unwrap_or(peer_fee_base_msat), | ||
fees_proportional_millionths: fees_proportional_millionths | ||
.unwrap_or(peer_fees_proportional_millionths), |
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 the remote fee policy cannot be found, we should not include the route hint in the response. It should never make sense to include the local channel policy in a route hint.
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.
Ok, I changed it so that it only adds route hints where the source channel is found
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.
LGTM
f5f8b45
to
17fef73
Compare
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.
I think this should be OK.
Thinking about it, I think there's still the possibility I suppose that there is an open channel with the LSP, but no route hint will be added, because we don't have the remote channel policy of the lsp.
So in the case:
- no route hint in the invoice
- no remote channel policy
- with active channel
There will not be an LSP hint added.
Would it make sense then to pass in the |
Yes but not always. I think only in case you don't find a channel policy because the policy might change after the channel was opened and if it exists then it is the correct one. |
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.
LGTM
eac0cf1
to
e0dca9c
Compare
Fixes #999