tfix lnworker.get_balance - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit f6f5cbee723ccbfc114733d4d3234840bce0fa8d
DIR parent b7d93e2e11b8f21d9b4005dbf24b5673869c9bcc
HTML Author: ThomasV <thomasv@electrum.org>
Date: Wed, 30 Jan 2019 19:28:42 +0100
fix lnworker.get_balance
Diffstat:
M electrum/lnworker.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git a/electrum/lnworker.py b/electrum/lnworker.py
t@@ -574,7 +574,7 @@ class LNWorker(PrintError):
def get_balance(self):
with self.lock:
- return Decimal(sum(chan.balance(LOCAL) for chan in self.channels.values()))/1000
+ return Decimal(sum(chan.balance(LOCAL) if chan.get_state() not in ['CLOSED', 'FORCE_CLOSING'] else 0 for chan in self.channels.values()))/1000
def list_channels(self):
with self.lock: