Skip to content

test_closing_anchorspend_htlc_tx_rbf still flaky #9088

@nGoline

Description

@nGoline

#9027 fixed the flake by adding did_short_sig(l1) or in front of the feerate assertions, assuming a short signature was lowering the transaction weight and pushing the feerate above the ±1 ceiling.

However, the test is still failing with the exact same value on this run:

FAILED tests/test_closing.py::test_closing_anchorspend_htlc_tx_rbf - assert (None or 3001.3083296990844 < (3000 + 1))
 +  where None = did_short_sig(<fixtures.LightningNode object at 0x7f1a89bb9c90>)

The identical value 3001.3083296990844 appearing with did_short_sig returning None rules out signature-length variation as the cause. The result is deterministic: fees / weight * 1000 simply rounds to a value just above 3001 for this specific transaction structure, regardless of signature size.

The fix is to replace the hand-rolled ±1 assertions with check_feerate(), which uses a ±2 window and already has the did_short_sig escape hatch built in.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions