mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 17:55:20 +00:00
fix bug in lightning get_history: filter settled htlcs first
This commit is contained in:
parent
30092cd68c
commit
1d82093ca1
1 changed files with 4 additions and 1 deletions
|
@ -447,7 +447,10 @@ class LNWallet(LNWorker):
|
||||||
def get_history(self):
|
def get_history(self):
|
||||||
out = []
|
out = []
|
||||||
for payment_hash, plist in self.get_payments().items():
|
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]
|
chan_id, htlc, _direction, status = plist[0]
|
||||||
if status != 'settled':
|
if status != 'settled':
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Reference in a new issue