mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 17:55:20 +00:00
fix lnsweep: prevout
This commit is contained in:
parent
7e34554d1e
commit
8274067619
1 changed files with 2 additions and 2 deletions
|
@ -286,13 +286,13 @@ def create_sweeptxs_for_their_latest_ctx(chan: 'Channel', ctx: Transaction,
|
|||
for htlc in received_htlcs:
|
||||
sweep_tx = create_sweeptx_for_htlc(htlc, is_received_htlc=True)
|
||||
if sweep_tx:
|
||||
txs[prevout] = EncumberedTransaction(f'their_ctx_sweep_htlc_{bh2u(htlc.payment_hash)}', sweep_tx, csv_delay=0, cltv_expiry=htlc.cltv_expiry)
|
||||
txs[sweep_tx.prevout(0)] = EncumberedTransaction(f'their_ctx_sweep_htlc_{bh2u(htlc.payment_hash)}', sweep_tx, csv_delay=0, cltv_expiry=htlc.cltv_expiry)
|
||||
# offered HTLCs, in their ctx --> "success"
|
||||
offered_htlcs = chan.included_htlcs_in_their_latest_ctxs(REMOTE)[ctn] # type: List[UpdateAddHtlc]
|
||||
for htlc in offered_htlcs:
|
||||
sweep_tx = create_sweeptx_for_htlc(htlc, is_received_htlc=False)
|
||||
if sweep_tx:
|
||||
txs[prevout] = EncumberedTransaction(f'their_ctx_sweep_htlc_{bh2u(htlc.payment_hash)}', sweep_tx, csv_delay=0, cltv_expiry=0)
|
||||
txs[sweep_tx.prevout(0)] = EncumberedTransaction(f'their_ctx_sweep_htlc_{bh2u(htlc.payment_hash)}', sweep_tx, csv_delay=0, cltv_expiry=0)
|
||||
return txs
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue