mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
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>
This commit is contained in:
committed by
Christian Decker
parent
7bb461acd8
commit
929fd3e2f6
@@ -1094,8 +1094,8 @@ class NodeFactory(object):
|
|||||||
bitcoind.rpc.sendtoaddress(addr, (fundamount + 1000000) / 10**8)
|
bitcoind.rpc.sendtoaddress(addr, (fundamount + 1000000) / 10**8)
|
||||||
|
|
||||||
bitcoind.generate_block(1)
|
bitcoind.generate_block(1)
|
||||||
|
sync_blockheight(bitcoind, nodes)
|
||||||
for src, dst in connections:
|
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)
|
tx = src.rpc.fundchannel(dst.info['id'], fundamount, announce=announce_channels)
|
||||||
wait_for(lambda: tx['txid'] in bitcoind.rpc.getrawmempool())
|
wait_for(lambda: tx['txid'] in bitcoind.rpc.getrawmempool())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user