aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/maxuploadtarget.py
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-01-03 18:54:50 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2016-06-22 15:43:00 +0200
commit2b1f6f9ccf36f1e0a2c9d99154e1642f796d7c2b (patch)
tree30b17fa55ea6c9ae0055c0c16d2e271a0c799d16 /qa/rpc-tests/maxuploadtarget.py
parent7c4bf779e8b74e474551982a24f5acc265293abd (diff)
BIP141: Other consensus critical limits, and BIP145
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
Diffstat (limited to 'qa/rpc-tests/maxuploadtarget.py')
-rwxr-xr-xqa/rpc-tests/maxuploadtarget.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/qa/rpc-tests/maxuploadtarget.py b/qa/rpc-tests/maxuploadtarget.py
index 5087f07620..125d4eb275 100755
--- a/qa/rpc-tests/maxuploadtarget.py
+++ b/qa/rpc-tests/maxuploadtarget.py
@@ -97,7 +97,7 @@ class MaxUploadTest(BitcoinTestFramework):
def setup_network(self):
# Start a node with maxuploadtarget of 200 MB (/24h)
self.nodes = []
- self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-maxuploadtarget=200", "-blockmaxsize=999000"]))
+ self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-maxuploadtarget=800", "-blockmaxsize=999000"]))
def mine_full_block(self, node, address):
# Want to create a full block
@@ -175,13 +175,13 @@ class MaxUploadTest(BitcoinTestFramework):
getdata_request = msg_getdata()
getdata_request.inv.append(CInv(2, big_old_block))
- max_bytes_per_day = 200*1024*1024
- daily_buffer = 144 * MAX_BLOCK_SIZE
+ max_bytes_per_day = 800*1024*1024
+ daily_buffer = 144 * 4000000
max_bytes_available = max_bytes_per_day - daily_buffer
success_count = max_bytes_available // old_block_size
- # 144MB will be reserved for relaying new blocks, so expect this to
- # succeed for ~70 tries.
+ # 576MB will be reserved for relaying new blocks, so expect this to
+ # succeed for ~235 tries.
for i in range(success_count):
test_nodes[0].send_message(getdata_request)
test_nodes[0].sync_with_ping()
@@ -198,9 +198,9 @@ class MaxUploadTest(BitcoinTestFramework):
# Requesting the current block on test_nodes[1] should succeed indefinitely,
# even when over the max upload target.
- # We'll try 200 times
+ # We'll try 800 times
getdata_request.inv = [CInv(2, big_new_block)]
- for i in range(200):
+ for i in range(800):
test_nodes[1].send_message(getdata_request)
test_nodes[1].sync_with_ping()
assert_equal(test_nodes[1].block_receive_map[big_new_block], i+1)