From 686df235a20e67374e9a494d4e12a36d902c4464 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 22 Aug 2019 14:09:44 +0930 Subject: [PATCH] pytest: fix race in test_block_backfill. Signed-off-by: Rusty Russell --- tests/test_db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_db.py b/tests/test_db.py index d67d2937e..92b6c3634 100644 --- a/tests/test_db.py +++ b/tests/test_db.py @@ -74,8 +74,8 @@ def test_block_backfill(node_factory, bitcoind): assert(31337 in [r['satoshis'] for r in l3.db_query("SELECT satoshis FROM utxoset")]) # Now close the channel and make sure `l3` cleans up correctly: - l1.rpc.close(l2.info['id']) - bitcoind.generate_block(1) + txid = l1.rpc.close(l2.info['id'])['txid'] + bitcoind.generate_block(1, wait_for_mempool=txid) wait_for(lambda: len(l3.rpc.listchannels()['channels']) == 0)