1
0

suggest_rebalance: special case for MPP heuristics

This commit is contained in:
ThomasV
2022-05-22 09:22:16 +02:00
parent 53151244e2
commit 0656e6d44e

View File

@@ -2170,6 +2170,9 @@ class LNWallet(LNWorker):
for chan in channels:
if func(deltas={chan:delta}) >= amount_sat:
suggestions.append((chan, delta))
elif direction==RECEIVED and func(deltas={chan:2*delta}) >= amount_sat:
# MPP heuristics has a 0.5 slope
suggestions.append((chan, 2*delta))
if not suggestions:
raise NotEnoughFunds
return suggestions