mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
pytest: fix flake in test_gossip_timestamp_filter
``` # 0x0100 = channel_announcement # 0x0102 = channel_update # (Node announcement may have any timestamp) types = Counter([m[0:4] for m in msgs]) assert types['0100'] == 1 > assert types['0102'] == 2 E assert 1 == 2 tests/test_gossip.py:324: AssertionError ``` Examining the logs shows that we ask l4 for timestamps "first_timestamp=1658892115 timestamp_range=13", and the timestamp on the missing update is exactly `1658892128`. So round the end time up by 1 for filtering. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
22ff007d64
commit
8c9fa457ba
@ -285,7 +285,7 @@ def test_gossip_timestamp_filter(node_factory, bitcoind, chainparams):
|
||||
bitcoind.generate_block(5)
|
||||
|
||||
l1.wait_for_channel_updates([chan23])
|
||||
after_23 = int(time.time())
|
||||
after_23 = int(time.time()) + 1
|
||||
|
||||
# Make sure l4 has received all the gossip.
|
||||
wait_for(lambda: ['alias' in node for node in l4.rpc.listnodes()['nodes']] == [True, True, True])
|
||||
|
Loading…
Reference in New Issue
Block a user