mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 15:04:19 +01:00
pytest: fix test_gossip_no_empty_announcements flake.
This is a side-effect of fixing aging: sometimes, we age our
rcvd_filter cache too fast, and thus re-xmit. This breaks
our test, since it used dev-disconnect on the channel_announce,
but that closes to l3, not l1!
```
> assert l1.rpc.listchannels()['channels'] == []
E AssertionError: assert [{'active': T...ags': 1, ...}] == []
E Left contains 2 more items, first extra item: {'active': True, 'amount_msat': 100000000msat, 'base_fee_millisatoshi': 1, 'channel_flags': 0, ...}
```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: #5403
This commit is contained in:
@@ -622,10 +622,10 @@ def test_gossip_no_empty_announcements(node_factory, bitcoind, chainparams):
|
||||
# l2 sends CHANNEL_ANNOUNCEMENT to l1, then disconnects/
|
||||
l2.daemon.wait_for_log('dev_disconnect')
|
||||
l1.daemon.wait_for_log(r'\[IN\] 0100')
|
||||
wait_for(lambda: l1.rpc.listchannels()['channels'] == [])
|
||||
|
||||
# l1 won't relay it (make sure it has time to digest though)
|
||||
time.sleep(2)
|
||||
assert l1.rpc.listchannels()['channels'] == []
|
||||
encoded = subprocess.run(['devtools/mkencoded', '--scids', '00'],
|
||||
check=True,
|
||||
timeout=TIMEOUT,
|
||||
|
||||
Reference in New Issue
Block a user