peer_control: don't complete fundchannel command until broadcast.

Under stress, the tests can mine blocks too soon, and the funding never
locks.  This gives more of a chance, at least.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-05-05 16:11:46 +09:30
parent 6dcd7f9d6d
commit 162dac1271
2 changed files with 7 additions and 4 deletions

View File

@@ -148,6 +148,8 @@ class LightningDTests(BaseLightningDTests):
l1.rpc.addfunds(tx)
l1.rpc.fundchannel(l2.info['id'], amount)
# Technically, this is async to fundchannel.
l1.daemon.wait_for_log('sendrawtx exit 0')
l1.bitcoin.rpc.generate(6)