From 0ed4fea899f551c7299b2be53e059d00a722be91 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sun, 5 Jun 2022 09:10:32 +0200 Subject: [PATCH] Revert "num_sats_can_receive: bucket channels that we have with the same node" This reverts commit c06a9ccb9cd1557cd0ef6698aa7d44b097c8232f. --- electrum/lnworker.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/electrum/lnworker.py b/electrum/lnworker.py index 038e31742..f61a3a460 100644 --- a/electrum/lnworker.py +++ b/electrum/lnworker.py @@ -2166,12 +2166,9 @@ class LNWallet(LNWorker): else: delta_msat = 0 return chan.available_to_spend(REMOTE) + delta_msat - # bucket channels that we have with the same node - can_recv_dict = defaultdict(int) with self.lock: - for c in self.get_channels_for_receiving(): - can_recv_dict[c.node_id] += recv_capacity(c) - recv_chan_msats = list(can_recv_dict.values()) + recv_channels = self.get_channels_for_receiving() + recv_chan_msats = [recv_capacity(chan) for chan in recv_channels] if not recv_chan_msats: return Decimal(0) can_receive_msat = max(