mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 08:04:26 +01:00
test_lightningd.py: test_closing_different_fees must wait for txs to hit mempool
Careful log examination revealed that we were generating a block before one of the mutual close txs had entered the mempool. This is rare because it means that both peers have to be too slow. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1366,6 +1366,12 @@ class LightningDTests(BaseLightningDTests):
|
|||||||
for c in closes:
|
for c in closes:
|
||||||
c.result(72)
|
c.result(72)
|
||||||
|
|
||||||
|
# close does *not* wait for the sendrawtransaction, so do that!
|
||||||
|
# Note that since they disagree on the ideal fee, they may conflict
|
||||||
|
# (first one in will win), so we cannot look at logs, we need to
|
||||||
|
# wait for mempool.
|
||||||
|
wait_for(lambda: bitcoind.rpc.getmempoolinfo()['size'] == num_peers)
|
||||||
|
|
||||||
bitcoind.generate_block(1)
|
bitcoind.generate_block(1)
|
||||||
for p in peers:
|
for p in peers:
|
||||||
p.daemon.wait_for_log(' to ONCHAIN')
|
p.daemon.wait_for_log(' to ONCHAIN')
|
||||||
|
|||||||
Reference in New Issue
Block a user