electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 670424f080c8446689bfd6f5a5848db0b98db862
parent 2ec82433b43b60a635a4d80af87381d5017c2fc1
Author: ThomasV <thomasv@electrum.org>
Date:   Mon,  6 May 2019 12:35:04 +0200

get_payments: do not include failed payments

Diffstat:
Melectrum/lnchannel.py | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py @@ -177,9 +177,11 @@ class Channel(Logger): for subject in LOCAL, REMOTE: log = self.hm.log[subject] for htlc_id, htlc in log.get('adds', {}).items(): - rhash = bh2u(htlc.payment_hash) + if htlc_id in log.get('fails',{}): + continue status = 'settled' if htlc_id in log.get('settles',{}) else 'inflight' direction = SENT if subject is LOCAL else RECEIVED + rhash = bh2u(htlc.payment_hash) out[rhash] = (self.channel_id, htlc, direction, status) return out