Skip to content

Commit c19fd96

Browse files
author
MarcoFalke
committed
Merge #19022: test: Fix intermittent failure in feature_dbcrash
fa2ca0c test: Fix intermittent failure in feature_dbcrash (MarcoFalke) Pull request description: Example backtrace https://cirrus-ci.com/task/6005716207009792?command=functional_test#L817 ACKs for top commit: jnewbery: utACK fa2ca0c Tree-SHA512: 978b3ac222f4764c887719240cfd1b29f72cdd273a456345b631e622db0a38e345c25a70d0bae8d4063c1ff6c1af892a7ee37d0d66f47284c2524b663c3afe55
2 parents e4bfd51 + fa2ca0c commit c19fd96

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/functional/feature_dbcrash.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,11 @@ def run_test(self):
256256
self.log.debug("Mining longer tip")
257257
block_hashes = []
258258
while current_height + 1 > self.nodes[3].getblockcount():
259-
block_hashes.extend(self.nodes[3].generate(min(10, current_height + 1 - self.nodes[3].getblockcount())))
259+
block_hashes.extend(self.nodes[3].generatetoaddress(
260+
nblocks=min(10, current_height + 1 - self.nodes[3].getblockcount()),
261+
# new address to avoid mining a block that has just been invalidated
262+
address=self.nodes[3].getnewaddress(),
263+
))
260264
self.log.debug("Syncing %d new blocks...", len(block_hashes))
261265
self.sync_node3blocks(block_hashes)
262266
utxo_list = self.nodes[3].listunspent()
@@ -281,5 +285,6 @@ def run_test(self):
281285
if self.restart_counts[i] == 0:
282286
self.log.warning("Node %d never crashed during utxo flush!", i)
283287

288+
284289
if __name__ == "__main__":
285290
ChainstateWriteCrashTest().main()

0 commit comments

Comments
 (0)