From b748c1845ccdbea3442725533d1467090937c38f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 24 Jun 2024 13:11:04 +0930 Subject: [PATCH] pytest: fix flake in test_closing.py::test_penalty_htlc_tx_timeout lightningd-3 penalizes lightningd-2 but then it can see the preimage for the HTLC which has already been timed out: ``` 2024-06-24T02:41:29.4633900Z lightningd-3 2024-06-24T02:33:54.073Z **BROKEN** 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-onchaind-chan#1: HTLC already resolved by THEIR_HTLC_TIMEOUT_TO_THEM when we found preimage ``` This is fair: the test deliberately takes l3 offline for long enough that the HTLC can get timed out. Signed-off-by: Rusty Russell --- tests/test_closing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_closing.py b/tests/test_closing.py index 84646da0b..7c02cea40 100644 --- a/tests/test_closing.py +++ b/tests/test_closing.py @@ -1397,6 +1397,8 @@ def test_penalty_htlc_tx_timeout(node_factory, bitcoind, chainparams, anchors): 'plugin': coin_mvt_plugin, 'dev-no-reconnect': None, 'may_reconnect': True, + # This can happen, if l2 collects htlc before we penalize. + 'broken_log': 'HTLC already resolved by THEIR_HTLC_TIMEOUT_TO_THEM when we found preimage' }, { 'dev-no-reconnect': None, }, {