From 9378a04f1bd76149789c7dfd84e0bc3267e6a576 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 7 Jun 2016 22:44:47 +1200 Subject: [PATCH] Update RPC tests to account for reserved field --- qa/rpc-tests/rest.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qa/rpc-tests/rest.py b/qa/rpc-tests/rest.py index 03676fd5b..59963aad2 100755 --- a/qa/rpc-tests/rest.py +++ b/qa/rpc-tests/rest.py @@ -216,30 +216,30 @@ class RESTTest (BitcoinTestFramework): # check binary format response = http_get_call(url.hostname, url.port, '/rest/block/'+bb_hash+self.FORMAT_SEPARATOR+"bin", "", True) assert_equal(response.status, 200) - assert_greater_than(int(response.getheader('content-length')), 237) + assert_greater_than(int(response.getheader('content-length')), 269) response_str = response.read() # compare with block header response_header = http_get_call(url.hostname, url.port, '/rest/headers/1/'+bb_hash+self.FORMAT_SEPARATOR+"bin", "", True) assert_equal(response_header.status, 200) - assert_equal(int(response_header.getheader('content-length')), 237) + assert_equal(int(response_header.getheader('content-length')), 269) response_header_str = response_header.read() - assert_equal(response_str[0:237], response_header_str) + assert_equal(response_str[0:269], response_header_str) # check block hex format response_hex = http_get_call(url.hostname, url.port, '/rest/block/'+bb_hash+self.FORMAT_SEPARATOR+"hex", "", True) assert_equal(response_hex.status, 200) - assert_greater_than(int(response_hex.getheader('content-length')), 474) + assert_greater_than(int(response_hex.getheader('content-length')), 506) response_hex_str = response_hex.read() - assert_equal(response_str.encode("hex")[0:474], response_hex_str[0:474]) + assert_equal(response_str.encode("hex")[0:506], response_hex_str[0:506]) # compare with hex block header response_header_hex = http_get_call(url.hostname, url.port, '/rest/headers/1/'+bb_hash+self.FORMAT_SEPARATOR+"hex", "", True) assert_equal(response_header_hex.status, 200) - assert_greater_than(int(response_header_hex.getheader('content-length')), 474) + assert_greater_than(int(response_header_hex.getheader('content-length')), 506) response_header_hex_str = response_header_hex.read() - assert_equal(response_hex_str[0:474], response_header_hex_str[0:474]) - assert_equal(response_header_str.encode("hex")[0:474], response_header_hex_str[0:474]) + assert_equal(response_hex_str[0:506], response_header_hex_str[0:506]) + assert_equal(response_header_str.encode("hex")[0:506], response_header_hex_str[0:506]) # check json format json_string = http_get_call(url.hostname, url.port, '/rest/block/'+bb_hash+self.FORMAT_SEPARATOR+'json')