From ba7901bebd3b61d063db6ef34cf76d169534adbf Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 13 Apr 2023 12:25:22 +0930 Subject: [PATCH] pytest: fix up test_gossip_ratelimit. We were in fact feeding l1 its own gossip, which it doesn't ratelimit (this was a bit fuzzy before, but definitely is the case now!). So make this node actually l3, so we test what we expected to test. Signed-off-by: Rusty Russell --- tests/test_gossip.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/test_gossip.py b/tests/test_gossip.py index 1c640ed3d..cc41a6464 100644 --- a/tests/test_gossip.py +++ b/tests/test_gossip.py @@ -1869,11 +1869,9 @@ def test_gossip_ratelimit(node_factory, bitcoind): We get BROKEN logs because gossipd talks about non-existent channels to lightningd ("**BROKEN** lightningd: Local update for bad scid 103x1x1"). """ - l3, = node_factory.get_nodes( - 1, - opts=[{'dev-gossip-time': 1568096251, - 'allow_broken_log': True}] - ) + l3 = node_factory.get_node(node_id=3, + allow_broken_log=True, + options={'dev-gossip-time': 1568096251}) # Bump to block 102, so the following tx ends up in 103x1: bitcoind.generate_block(1)