From 929fd3e2f66cac1d7fea4acb8aef9bdb94420133 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 7 Aug 2020 12:43:55 +0930 Subject: [PATCH] pytest: make sure all nodes see funds using sync_blockheight We might have funds prior to calling join_nodes(), so testing that we've all seen the block is better. Signed-off-by: Rusty Russell --- contrib/pyln-testing/pyln/testing/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/pyln-testing/pyln/testing/utils.py b/contrib/pyln-testing/pyln/testing/utils.py index cfabb9cde..a9616bea1 100644 --- a/contrib/pyln-testing/pyln/testing/utils.py +++ b/contrib/pyln-testing/pyln/testing/utils.py @@ -1094,8 +1094,8 @@ class NodeFactory(object): bitcoind.rpc.sendtoaddress(addr, (fundamount + 1000000) / 10**8) bitcoind.generate_block(1) + sync_blockheight(bitcoind, nodes) for src, dst in connections: - wait_for(lambda: len(src.rpc.listfunds()['outputs']) > 0) tx = src.rpc.fundchannel(dst.info['id'], fundamount, announce=announce_channels) wait_for(lambda: tx['txid'] in bitcoind.rpc.getrawmempool())