Commit Graph

5 Commits

Author SHA1 Message Date
Christian Decker
ea8e24eb56 fixup! jitrebalance: First version of the JITrebalance plugin 2020-01-07 21:21:11 +01:00
Christian Decker
504d15bfbf jitrebalance: Refactor code and implement retry logic 2020-01-07 21:21:11 +01:00
Christian Decker
9ef45ae83c jitrebalance: Skip tests if not developer, gossip is too slow 2020-01-07 21:21:11 +01:00
Christian Decker
7479c342c4 jitrebalance: Make the plugin TLV compatible 2020-01-07 21:21:11 +01:00
Christian Decker
c453e8982f jitrebalance: First version of the JITrebalance plugin
A simple implementation of a jit-rebalance plugin based in the idea of
@renepickhardt. Upon receiving an HTLC that we are supposed to forward check
whether the channel has sufficient capacity to forward. If that's not the case
we need to rebalance. For this we compute a circular route through some other
nodes, returning funds on the edge we are supposed to use when
forwarding. This means we rebalance the channel just enough to make forwarding
possible.

This only implements the simple version, without FOAF advertisements of free
rebalancings, but it already works rather nicely.

Suggested-by: Rene Pickhardt <@renepickhardt>
Signed-off-by: Christian Decker <@cdecker>
2020-01-07 21:21:11 +01:00