mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-02 18:35:00 +01:00
pytest: fix flaky 'Bad gossip' error in test_block_backfill
Sometimes the l3 seeker asks for scids, and the reply contains the channel which is then closed by the time it checks, so it considers the updates bad gossip. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
4c2f51ce13
commit
04403ed59f
1 changed files with 4 additions and 0 deletions
|
@ -79,6 +79,10 @@ def test_block_backfill(node_factory, bitcoind, chainparams):
|
|||
# Make sure we also have the needle we added to the haystack above
|
||||
assert(31337 in [r['satoshis'] for r in l3.db_query("SELECT satoshis FROM utxoset")])
|
||||
|
||||
# Make sure that l3 doesn't ask for more gossip and get a reply about
|
||||
# the closed channel (hence Bad gossip msgs in log).
|
||||
l3.daemon.wait_for_log('seeker: state = NORMAL')
|
||||
|
||||
# Now close the channel and make sure `l3` cleans up correctly:
|
||||
txid = l1.rpc.close(l2.info['id'])['txid']
|
||||
bitcoind.generate_block(1, wait_for_mempool=txid)
|
||||
|
|
Loading…
Add table
Reference in a new issue