#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.
#9027 fixed the flake by adding
did_short_sig(l1) orin 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:
The identical value
3001.3083296990844appearing withdid_short_sigreturningNonerules out signature-length variation as the cause. The result is deterministic:fees / weight * 1000simply rounds to a value just above 3001 for this specific transaction structure, regardless of signature size.The fix is to replace the hand-rolled
±1assertions withcheck_feerate(), which uses a±2window and already has thedid_short_sigescape hatch built in.