Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13711133
D6116.id20224.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D6116.id20224.diff
View Options
diff --git a/test/functional/feature_dbcrash.py b/test/functional/feature_dbcrash.py
--- a/test/functional/feature_dbcrash.py
+++ b/test/functional/feature_dbcrash.py
@@ -252,11 +252,23 @@
starting_tip_height = self.nodes[3].getblockcount()
+ # Set mock time to the last block time. This will allow us to increase
+ # the time at each loop so the block hash will always differ for the
+ # same block height, and avoid duplication.
+ # Note that the current time can be behind the block time due to the
+ # way the miner sets the block time.
+ tip = self.nodes[3].getbestblockhash()
+ block_time = self.nodes[3].getblockheader(tip)['time']
+ self.nodes[3].setmocktime(block_time)
+
# Main test loop:
# each time through the loop, generate a bunch of transactions,
# and then either mine a single new block on the tip, or some-sized
# reorg.
for i in range(40):
+ block_time += 10
+ self.nodes[3].setmocktime(block_time)
+
self.log.info(
"Iteration {}, generating 2500 transactions {}".format(
i, self.restart_counts))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 26, 10:35 (5 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5570471
Default Alt Text
D6116.id20224.diff (1 KB)
Attached To
D6116: Fix dbcrash spurious failures
Event Timeline
Log In to Comment