aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-05-29 11:27:57 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-05-29 11:28:00 -0400
commitc19fd96694d15966f1cc83c43bae2746b92d3149 (patch)
tree4cf4ef01f8aa10b41ac8bee8edbad9e65f0890d0 /test
parente4bfd51acc111c27f8a808756f88738b02388c38 (diff)
parentfa2ca0cbdde5c6c5e407ec037e52e3f6315a0b37 (diff)
Merge #19022: test: Fix intermittent failure in feature_dbcrash
fa2ca0cbdde5c6c5e407ec037e52e3f6315a0b37 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 fa2ca0cbdde5c6c5e407ec037e52e3f6315a0b37 Tree-SHA512: 978b3ac222f4764c887719240cfd1b29f72cdd273a456345b631e622db0a38e345c25a70d0bae8d4063c1ff6c1af892a7ee37d0d66f47284c2524b663c3afe55
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/feature_dbcrash.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/functional/feature_dbcrash.py b/test/functional/feature_dbcrash.py
index 5bbdb8cda1..7b38e09bf9 100755
--- a/test/functional/feature_dbcrash.py
+++ b/test/functional/feature_dbcrash.py
@@ -256,7 +256,11 @@ class ChainstateWriteCrashTest(BitcoinTestFramework):
self.log.debug("Mining longer tip")
block_hashes = []
while current_height + 1 > self.nodes[3].getblockcount():
- block_hashes.extend(self.nodes[3].generate(min(10, current_height + 1 - self.nodes[3].getblockcount())))
+ block_hashes.extend(self.nodes[3].generatetoaddress(
+ nblocks=min(10, current_height + 1 - self.nodes[3].getblockcount()),
+ # new address to avoid mining a block that has just been invalidated
+ address=self.nodes[3].getnewaddress(),
+ ))
self.log.debug("Syncing %d new blocks...", len(block_hashes))
self.sync_node3blocks(block_hashes)
utxo_list = self.nodes[3].listunspent()
@@ -281,5 +285,6 @@ class ChainstateWriteCrashTest(BitcoinTestFramework):
if self.restart_counts[i] == 0:
self.log.warning("Node %d never crashed during utxo flush!", i)
+
if __name__ == "__main__":
ChainstateWriteCrashTest().main()