Commit Graph

1 Commits

Author SHA1 Message Date
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