Browse Source

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 <rusty@rustcorp.com.au>
bump-pyln-proto
Rusty Russell 4 years ago
committed by Christian Decker
parent
commit
929fd3e2f6
  1. 2
      contrib/pyln-testing/pyln/testing/utils.py

2
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())

Loading…
Cancel
Save