Fix dbcrash spurious failures
feature_dbcrash will sometime fail due to duplicated block hashes.
There is a chance that a block get invalidated, and there is a chance
that it only contains the coinbase. Since the address is now a constant,
and mining on regtest is fast, the block hash can end up being the same
that one from the invalidated chain.
This diff ensures that the block time is different to prevent such a
You can help the test to fail (without this diff) by replacing the line:
if random.random() < 1.0 / (current_height + 4 - random_height):
if random.random() < 1.0:
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D6116