From d4ef20d54a7db05d96e4df8c0906dae475697218 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 27 Sep 2022 09:48:33 +0930 Subject: [PATCH] pytest: fix flake in test_gossip_persistence. We used to ensure the l3<->l4 channel was private by simply not mining enough blocks to announce. Then we started mining 13 blocks to close the channel, and it will get announced, causing a failure: ``` assert non_public(l2) == [] > wait_for(lambda: non_public(l3) == [scid34, scid34]) ... > raise ValueError("Timeout while waiting for {}", success) E ValueError: ('Timeout while waiting for {}', . at 0x7f6cc69b4170>) ``` Signed-off-by: Rusty Russell --- tests/test_gossip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_gossip.py b/tests/test_gossip.py index a1cccf215..f2e0a34ca 100644 --- a/tests/test_gossip.py +++ b/tests/test_gossip.py @@ -526,9 +526,9 @@ def test_gossip_persistence(node_factory, bitcoind): scid12, _ = l1.fundchannel(l2, 10**6) scid23, _ = l2.fundchannel(l3, 10**6) - # Make channels public, except for l3 -> l4, which is kept local-only for now + # Make channels public, except for l3 -> l4, which is kept local-only mine_funding_to_announce(bitcoind, [l1, l2, l3, l4]) - scid34, _ = l3.fundchannel(l4, 10**6) + scid34, _ = l3.fundchannel(l4, 10**6, announce_channel=False) bitcoind.generate_block(1) def active(node):