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

Routing hints balance #1443

Merged
merged 4 commits into from
Jun 23, 2020
Merged

Routing hints balance #1443

merged 4 commits into from
Jun 23, 2020

Conversation

t-bast
Copy link
Member

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

This is a collection of several small fixes/improvements:

  • Ignore routing hints for our own channels
  • Assume a bigger capacity than just the HTLC amount in routing hints
  • Correctly handle balance change events for private channels

t-bast added 3 commits June 23, 2020 11:55
We assume that twice the payment amount can be routed through the channel
for extra safety.
@t-bast t-bast force-pushed the routing-hints-balance branch from d4fea18 to e9c5878 Compare June 23, 2020 09:57
@t-bast t-bast marked this pull request as ready for review June 23, 2020 11:05
@t-bast t-bast requested a review from pm47 June 23, 2020 11:05
@@ -109,7 +109,7 @@ object RouteCalculation {
// should be able to route the payment, so we'll compute an htlcMaximumMsat accordingly.
// We could also get the channel capacity from the blockchain (since we have the shortChannelId) but that's more expensive.
// We also need to make sure the channel isn't excluded by our heuristics.
val lastChannelCapacity = amount.max(RoutingHeuristics.CAPACITY_CHANNEL_LOW)
val lastChannelCapacity = (amount * 2).max(RoutingHeuristics.CAPACITY_CHANNEL_LOW)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this, except if we have a real reason behind this change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This indeed shouldn't be necessary, I reverted it in aaf17b6

@t-bast t-bast merged commit 88cb24d into master Jun 23, 2020
@t-bast t-bast deleted the routing-hints-balance branch June 23, 2020 13:23
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