Skip to content

pytest: let either HTLC claim reveal the preimage in test_onchain_middleman_fulfill_after_fail - #69

Merged
kwsantiago merged 1 commit into
blake2b-unifiedfrom
pytest-htlc-claims-share-utxo
Oct 25, 2026
Merged

kwsantiago merged 1 commit into
blake2b-unifiedfrom
pytest-htlc-claims-share-utxo

Conversation

@kwsantiago

Copy link
Copy Markdown

test_onchain_middleman_fulfill_after_fail waited for one specific HTLC-success txid. l3 claims two HTLCs with the same preimage, and both claims take their fee from l3's only wallet UTXO. When the HTLCs' deadlines differ, their claims target different feerates and only the higher one stays in the mempool, so the test timed out whenever it was waiting on the other. This failed every run in the Knots backend job.

The test now mines a block between the two HTLCs so their deadlines always differ, and mines once either claim is in the mempool, since either reveals the preimage to l2.

Tested: the old test fails locally with the extra block, with the same feerates and rejection as CI. The new test passes 6 of 6 against the pinned Knots backend.

Changelog-None

@kwsantiago
kwsantiago merged commit 48cf1a6 into blake2b-unified Oct 25, 2026
89 of 91 checks passed
@kwsantiago
kwsantiago deleted the pytest-htlc-claims-share-utxo branch October 25, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant