tfix bug in lightning get_history: filter settled htlcs first - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 1d82093ca1edb0ce33208b9288055a3883466ba1 DIR parent 30092cd68cdd7d0f31d91cccf5fb509726c37cf0 HTML Author: ThomasV <thomasv@electrum.org> Date: Wed, 11 Sep 2019 17:06:07 +0200 fix bug in lightning get_history: filter settled htlcs first Diffstat: M electrum/lnworker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- DIR diff --git a/electrum/lnworker.py b/electrum/lnworker.py t@@ -447,7 +447,10 @@ class LNWallet(LNWorker): def get_history(self): out = [] for payment_hash, plist in self.get_payments().items(): - if len(plist) == 1: + plist = list(filter(lambda x: x[3] == 'settled', plist)) + if len(plist) == 0: + continue + elif len(plist) == 1: chan_id, htlc, _direction, status = plist[0] if status != 'settled': continue