-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
routing: local balance check before path finding #3749
routing: local balance check before path finding #3749
Conversation
962616c
to
7939a9d
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.
nice commit structure, only question i have is whether or not to also begin exposing the tlv failures as a specific rpc destination failure rather than no route found. it's not super in line with this pr, so may be best in a follow up
05ffb0f
to
bbd7cd5
Compare
bbd7cd5
to
a57595b
Compare
Todo: add test |
a57595b
to
7f7cc1e
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.
Great work, the changes were very easy to follow.
This fix should really improve the UX of lnd, especially for beginners.
There are only two small things that should be fixed IMO, the rest is non-blocking.
7f7cc1e
to
32900ec
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.
LGTM 💯
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 👍
// ErrTargetNotInNetwork is returned when the target of a path-finding | ||
// or payment attempt isn't known to be within the current version of | ||
// the channel graph. | ||
ErrTargetNotInNetwork | ||
ErrTargetNotInNetwork errorCode = iota |
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.
preexisting, but errorCode
should be exported if ErrTargetNotInNetwork
is also exported for godocs
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.
could be made into a trivial follow up
two of the async benchmarks failed, perhaps an indicator that this introduces a performance regression? |
Manually checked the timing of a queryroutes call on testnet, didn't see a difference with master. Restarted itests |
Yes, does seem to be failing consistently. Will check it out. |
A unified policy differs between local channels and other channels on the network. There is more information available for local channels and this is used in the unified policy. Previously we used the pathfinding source pubkey to determine whether to apply the local channel logic or not. If queryroutes is executed with a source node that isn't the self node, this wouldn't work.
32900ec
to
9ae014e
Compare
Turned out to be a deadlock with getting the source node. Fixed now |
Fixes #1680