mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
pytest: optimize join_nodes a little.
We can query all the txids at once, rather than one at a time. Doesn't make any measurable difference to full runtime testing here though. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
fde353ab00
commit
79278b880f
@@ -1095,9 +1095,11 @@ class NodeFactory(object):
|
|||||||
|
|
||||||
bitcoind.generate_block(1)
|
bitcoind.generate_block(1)
|
||||||
sync_blockheight(bitcoind, nodes)
|
sync_blockheight(bitcoind, nodes)
|
||||||
|
txids = []
|
||||||
for src, dst in connections:
|
for src, dst in connections:
|
||||||
tx = src.rpc.fundchannel(dst.info['id'], fundamount, announce=announce_channels)
|
txids.append(src.rpc.fundchannel(dst.info['id'], fundamount, announce=announce_channels)['txid'])
|
||||||
wait_for(lambda: tx['txid'] in bitcoind.rpc.getrawmempool())
|
|
||||||
|
wait_for(lambda: set(txids).issubset(set(bitcoind.rpc.getrawmempool())))
|
||||||
|
|
||||||
# Confirm all channels and wait for them to become usable
|
# Confirm all channels and wait for them to become usable
|
||||||
bitcoind.generate_block(1)
|
bitcoind.generate_block(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user