mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
Remove early return in create_sweeptxs_for_our_ctx.
- This was added because we did not store the complete htlc history. - It makes the result dependent on the current channel state - That creates a race condition in sweep_info, because the result is cached. - As a result, test_breach_with_spent_htlc was randomly failing.
This commit is contained in:
parent
5f817770af
commit
d0cfb3ae12
1 changed files with 0 additions and 5 deletions
|
@ -186,11 +186,6 @@ def create_sweeptxs_for_our_ctx(chan: 'Channel', ctx: Transaction, ctn: int,
|
||||||
return
|
return
|
||||||
# we have to_local, to_remote.
|
# we have to_local, to_remote.
|
||||||
# other outputs are htlcs
|
# other outputs are htlcs
|
||||||
# if they are spent, we need to generate the script
|
|
||||||
# so, second-stage htlc sweep should not be returned here
|
|
||||||
if ctn < chan.get_oldest_unrevoked_ctn(LOCAL):
|
|
||||||
_logger.info("we breached.")
|
|
||||||
return {}
|
|
||||||
txs = {}
|
txs = {}
|
||||||
# to_local
|
# to_local
|
||||||
output_idx = ctx.get_output_idx_from_address(to_local_address)
|
output_idx = ctx.get_output_idx_from_address(to_local_address)
|
||||||
|
|
Loading…
Add table
Reference in a new issue