mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
pyln: Log mempool when we generate blocks in BitcoinD fixture
We sometimes have very specific sequences of tx broadcasts and blocks being generated to confirm them. If the confirmation is missed the test can completely get out of sync. Make debugging this easier by logging what we confirmed.
This commit is contained in:
parent
6af8adde26
commit
8b09ac38aa
@ -401,6 +401,14 @@ class BitcoinD(TailableProc):
|
||||
wait_for(lambda: all(txid in self.rpc.getrawmempool() for txid in wait_for_mempool))
|
||||
else:
|
||||
wait_for(lambda: len(self.rpc.getrawmempool()) >= wait_for_mempool)
|
||||
|
||||
mempool = self.rpc.getrawmempool()
|
||||
logging.debug("Generating {numblocks}, confirming {lenmempool} transactions: {mempool}".format(
|
||||
numblocks=numblocks,
|
||||
mempool=mempool,
|
||||
lenmempool=len(mempool),
|
||||
))
|
||||
|
||||
# As of 0.16, generate() is removed; use generatetoaddress.
|
||||
return self.rpc.generatetoaddress(numblocks, self.rpc.getnewaddress())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user