From 0656e6d44e64262fe0789a907631ef35a86cb037 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sun, 22 May 2022 09:22:16 +0200 Subject: [PATCH] suggest_rebalance: special case for MPP heuristics --- electrum/lnworker.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/electrum/lnworker.py b/electrum/lnworker.py index 15f130c6b..92c92af3c 100644 --- a/electrum/lnworker.py +++ b/electrum/lnworker.py @@ -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