aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/maxuploadtarget.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2016-12-05 00:27:47 +0100
committerMarcoFalke <falke.marco@gmail.com>2016-12-05 00:31:10 +0100
commitfab1af31d43f0db58f590992d1cc5e302f1133f8 (patch)
tree4536479a72e1226030139340e1c62bfebb69b970 /qa/rpc-tests/maxuploadtarget.py
parentfa2ecc48fb84f5d74807acb162b46ccece6f4caa (diff)
[qa] maxuploadtarget: Use cached utxo set
Diffstat (limited to 'qa/rpc-tests/maxuploadtarget.py')
-rwxr-xr-xqa/rpc-tests/maxuploadtarget.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/qa/rpc-tests/maxuploadtarget.py b/qa/rpc-tests/maxuploadtarget.py
index 83168a7ce7..9340e899eb 100755
--- a/qa/rpc-tests/maxuploadtarget.py
+++ b/qa/rpc-tests/maxuploadtarget.py
@@ -86,6 +86,9 @@ class MaxUploadTest(BitcoinTestFramework):
self.setup_clean_chain = True
self.num_nodes = 1
+ # Cache for utxos, as the listunspent may take a long time later in the test
+ self.utxo_cache = []
+
def setup_network(self):
# Start a node with maxuploadtarget of 200 MB (/24h)
self.nodes = []
@@ -118,7 +121,7 @@ class MaxUploadTest(BitcoinTestFramework):
# Test logic begins here
# Now mine a big block
- mine_large_block(self.nodes[0])
+ mine_large_block(self.nodes[0], self.utxo_cache)
# Store the hash; we'll request this later
big_old_block = self.nodes[0].getbestblockhash()
@@ -129,7 +132,7 @@ class MaxUploadTest(BitcoinTestFramework):
self.nodes[0].setmocktime(int(time.time()) - 2*60*60*24)
# Mine one more block, so that the prior block looks old
- mine_large_block(self.nodes[0])
+ mine_large_block(self.nodes[0], self.utxo_cache)
# We'll be requesting this new block too
big_new_block = self.nodes[0].getbestblockhash()