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

Fix edges with empty capacity in the routing graph #1446

Merged
merged 2 commits into from
Jun 5, 2020

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Jun 5, 2020

Light clients don't always validate channels by fetching the blockchain tx.
That means they don't have access to the exact capacity.
When that happens, we should fallback to htlc_maximum_msat if available, or to a default capacity (otherwise path-finding will ignore these edges).

Light clients don't always validate channels by fetching the blockchain tx.
That means they don't have access to the exact capacity.
When that happens, we can fallback to htlc_maximum_msat if
available, or to a default capacity (otherwise path-finding will ignore
these edges).
@t-bast t-bast requested review from dpad85 and sstone June 5, 2020 08:13
@sstone
Copy link
Member

sstone commented Jun 5, 2020

LGTM, but it's a bit difficult to test as I don't think it's covered by our unit tests yet (on master capacity is correct as we get it from the blockchain, on android it's not but "A->B->C" type tests are disabled as we don't relay payments which is why this issue was not detected before, and on phoenix it's not relevant).
I'll test on android and add a comment.

@t-bast
Copy link
Member Author

t-bast commented Jun 5, 2020

Actually this doesn't cover all the way we can create the graph. Wait before testing on android, I need to add another commit to cover everything.

@t-bast
Copy link
Member Author

t-bast commented Jun 5, 2020

You should be good now, I was missing the helper method we use to create the graph initially from the DB.

@sstone
Copy link
Member

sstone commented Jun 5, 2020

I checked that it does fix route computation on Android.

@t-bast t-bast merged commit 4cfb7d9 into master Jun 5, 2020
@t-bast t-bast deleted the fix-empty-channel-capacity branch June 5, 2020 15:00
@sstone sstone mentioned this pull request Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants