Skip to content

Commit 9a01ae8

Browse files
committed
pytest: fix flake in test_closing_anchorspend_htlc_tx_rbf
``` 2026-04-02T04:45:50.5882651Z > assert 3000 - 1 < total_feerate_perkw < 3000 + 1 2026-04-02T04:45:50.5883085Z E assert 3001.3083296990844 < (3000 + 1) 2026-04-02T04:45:50.5883354Z 2026-04-02T04:45:50.5883508Z tests/test_closing.py:3853: AssertionError ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 39c243c commit 9a01ae8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_closing.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3787,7 +3787,8 @@ def test_closing_anchorspend_htlc_tx_rbf(node_factory, bitcoind):
37873787
# We want an outstanding HTLC for l1, so it uses anchor to push.
37883788
# Set feerates to lowball for now.
37893789
l1, l2 = node_factory.line_graph(2, opts=[{'feerates': (1000,) * 4,
3790-
'min-emergency-msat': 546000},
3790+
'min-emergency-msat': 546000,
3791+
broken_log: 'overgrind: short signature length'},
37913792
{'feerates': (1000,) * 4,
37923793
'disconnect': ['-WIRE_UPDATE_FAIL_HTLC']}])
37933794
assert 'anchors/even' in only_one(l1.rpc.listpeerchannels()['channels'])['channel_type']['names']
@@ -3835,7 +3836,7 @@ def test_closing_anchorspend_htlc_tx_rbf(node_factory, bitcoind):
38353836
total_weight = sum([d['weight'] for d in details])
38363837
total_fees = sum([float(d['fees']['base']) * 100_000_000 for d in details])
38373838
total_feerate_perkw = total_fees / total_weight * 1000
3838-
assert 2000 - 1 < total_feerate_perkw < 2000 + 1
3839+
assert did_short_sig(l1) or 2000 - 1 < total_feerate_perkw < 2000 + 1
38393840

38403841
# But we don't mine it! And fees go up again!
38413842
l1.set_feerates((3000, 3000, 3000, 3000))
@@ -3850,7 +3851,7 @@ def test_closing_anchorspend_htlc_tx_rbf(node_factory, bitcoind):
38503851
total_weight = sum([d['weight'] for d in details])
38513852
total_fees = sum([float(d['fees']['base']) * 100_000_000 for d in details])
38523853
total_feerate_perkw = total_fees / total_weight * 1000
3853-
assert 3000 - 1 < total_feerate_perkw < 3000 + 1
3854+
assert did_short_sig(l1) or 3000 - 1 < total_feerate_perkw < 3000 + 1
38543855

38553856
# And now we'll get it in (there's some rounding, so feerate a bit lower!)
38563857
bitcoind.generate_block(1, needfeerate=2990)

0 commit comments

Comments
 (0)