1
0

Revert "num_sats_can_receive: bucket channels that we have with the same node"

This reverts commit c06a9ccb9c.
This commit is contained in:
ThomasV
2022-06-05 09:10:32 +02:00
parent c06a9ccb9c
commit 0ed4fea899

View File

@@ -2166,12 +2166,9 @@ class LNWallet(LNWorker):
else: else:
delta_msat = 0 delta_msat = 0
return chan.available_to_spend(REMOTE) + delta_msat 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: with self.lock:
for c in self.get_channels_for_receiving(): recv_channels = self.get_channels_for_receiving()
can_recv_dict[c.node_id] += recv_capacity(c) recv_chan_msats = [recv_capacity(chan) for chan in recv_channels]
recv_chan_msats = list(can_recv_dict.values())
if not recv_chan_msats: if not recv_chan_msats:
return Decimal(0) return Decimal(0)
can_receive_msat = max( can_receive_msat = max(