File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,9 @@ def __init__(self):
86
86
self .setup_clean_chain = True
87
87
self .num_nodes = 1
88
88
89
+ # Cache for utxos, as the listunspent may take a long time later in the test
90
+ self .utxo_cache = []
91
+
89
92
def setup_network (self ):
90
93
# Start a node with maxuploadtarget of 200 MB (/24h)
91
94
self .nodes = []
@@ -118,7 +121,7 @@ def run_test(self):
118
121
# Test logic begins here
119
122
120
123
# Now mine a big block
121
- mine_large_block (self .nodes [0 ])
124
+ mine_large_block (self .nodes [0 ], self . utxo_cache )
122
125
123
126
# Store the hash; we'll request this later
124
127
big_old_block = self .nodes [0 ].getbestblockhash ()
@@ -129,7 +132,7 @@ def run_test(self):
129
132
self .nodes [0 ].setmocktime (int (time .time ()) - 2 * 60 * 60 * 24 )
130
133
131
134
# Mine one more block, so that the prior block looks old
132
- mine_large_block (self .nodes [0 ])
135
+ mine_large_block (self .nodes [0 ], self . utxo_cache )
133
136
134
137
# We'll be requesting this new block too
135
138
big_new_block = self .nodes [0 ].getbestblockhash ()
You can’t perform that action at this time.
0 commit comments