diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-05-19 18:57:09 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-05-19 18:57:09 -0400 |
commit | fa2ca0cbdde5c6c5e407ec037e52e3f6315a0b37 (patch) | |
tree | 5b68181ae8b6c9f642e98944979250ee36cc517d /test/functional/feature_dbcrash.py | |
parent | aa8d76806c74a51ec66e5004394fe9ea8ff0fac4 (diff) | |
download | bitcoin-fa2ca0cbdde5c6c5e407ec037e52e3f6315a0b37.tar.xz |
test: Fix intermittent failure in feature_dbcrash
Diffstat (limited to 'test/functional/feature_dbcrash.py')
-rwxr-xr-x | test/functional/feature_dbcrash.py | 7 |
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() |