Merge pull request #2860 from patricklodder/1.14.6-fix-binresponse

[qa] fix binary response parsing in rest test
This commit is contained in:
Old Dip Tracker 2022-04-06 03:24:52 -04:00 committed by GitHub
commit 9c79c2de2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -352,7 +352,7 @@ class RESTTest (BitcoinTestFramework):
resp_bin = http_get_call(url.hostname, url.port, '/rest/blockhashbyheight/' + str(block_json_obj['height']) + self.FORMAT_SEPARATOR + 'bin', True)
assert_equal(resp_bin.status, 200)
assert_equal(int(resp_bin.getheader('content-length')), 32)
response_str = resp_bin.read().rstrip()
response_str = resp_bin.read()
blockhash = response_str[::-1].hex()
assert_equal(blockhash, block_json_obj['hash'])