File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -35,16 +35,17 @@ def mine_large_blocks(node, n):
35
35
# followed by 950k of OP_NOP. This would be non-standard in a non-coinbase
36
36
# transaction but is consensus valid.
37
37
38
+ # Set the nTime if this is the first time this function has been called.
39
+ # A static variable ensures that time is monotonicly increasing and is therefore
40
+ # different for each block created => blockhash is unique.
41
+ if "nTimes" not in mine_large_blocks .__dict__ :
42
+ mine_large_blocks .nTime = 0
43
+
38
44
# Get the block parameters for the first block
39
45
big_script = CScript ([OP_RETURN ] + [OP_NOP ] * 950000 )
40
46
best_block = node .getblock (node .getbestblockhash ())
41
47
height = int (best_block ["height" ]) + 1
42
- try :
43
- # Static variable ensures that time is monotonicly increasing and is therefore
44
- # different for each block created => blockhash is unique.
45
- mine_large_blocks .nTime = min (mine_large_blocks .nTime , int (best_block ["time" ])) + 1
46
- except AttributeError :
47
- mine_large_blocks .nTime = int (best_block ["time" ]) + 1
48
+ mine_large_blocks .nTime = max (mine_large_blocks .nTime , int (best_block ["time" ])) + 1
48
49
previousblockhash = int (best_block ["hash" ], 16 )
49
50
50
51
for _ in range (n ):
Original file line number Diff line number Diff line change 69
69
BASE_SCRIPTS = [
70
70
# Scripts that are run by the travis build process.
71
71
# Longest test should go first, to favor running tests in parallel
72
+ 'feature_pruning.py' ,
72
73
'feature_fee_estimation.py' ,
73
74
'wallet_hd.py' ,
74
75
'wallet_backup.py' ,
199
200
EXTENDED_SCRIPTS = [
200
201
# These tests are not run by the travis build process.
201
202
# Longest test should go first, to favor running tests in parallel
202
- 'feature_pruning.py' ,
203
203
'feature_dbcrash.py' ,
204
204
]
205
205
You can’t perform that action at this time.
0 commit comments