mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-03 12:30:07 +00:00
get_payments: do not include failed payments
This commit is contained in:
parent
2ec82433b4
commit
670424f080
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue