Commit Graph

8 Commits

Author SHA1 Message Date
Jesse de Wit
cc1362ead3 libplugin-pay: use map for channel hints
For nodes with many channels this is a tremendous improvement in pay
performance. PR #7611 improves payment performance from 15 seconds to
13.5 seconds on one of our nodes. This commit improves payment
performance from 13.5 seconds to 5.7 seconds.

Changelog-Fixed: Improved pathfinding speed for large nodes.
2024-10-07 15:16:46 +02:00
Christian Decker
a6a7dd8f71 pay: Switch to msat for total_capacity
This minimizes the need to convert back and forth from and to sat
values, and it also removes a new instance of sats in the public
interface (`channel_hints`).

Suggested-By: Rusty Russell <@rustyrussell>
2024-10-07 14:05:47 +02:00
Christian Decker
91ffa8e424 pay: Add channel_hint_set_count primitive 2024-10-07 14:05:47 +02:00
Christian Decker
50a0321759 pay: Use the global channel_hint_set and remember across payments 2024-10-07 14:05:47 +02:00
Christian Decker
3ad0085478 route: Change the type of the funding capacity to amount_sat
Keeping it in `amount_msat` made the comparisons easier, but it was
the wrong type for this.
2024-10-07 14:05:47 +02:00
Christian Decker
904eb3795c pay: Subscribe to the channel_hint_update notifications 2024-10-07 14:05:47 +02:00
Christian Decker
cf09314b3b pay: Rename overall_capacity to just capacity
Suggested-by: Rusty Russell <@rustyrussell>
2024-10-07 14:05:47 +02:00
Christian Decker
37a204df41 plugin: Split out the struct channel_hint handling
We're getting serious about how we manage the channel_hints, so let's
give them a proper home.
2024-10-07 14:05:47 +02:00