From cdc98a32ecee3e13f16b47aa8585501c02d9f6e5 Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Sun, 20 Feb 2022 20:04:04 +0100 Subject: [PATCH] [qa] fix binary response parsing in rest test Removing rstrip() from response parsing because it removes 0x20, which can be a legitimate first byte of a block hash --- qa/rpc-tests/rest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/rpc-tests/rest.py b/qa/rpc-tests/rest.py index 26252377a..1011868fa 100755 --- a/qa/rpc-tests/rest.py +++ b/qa/rpc-tests/rest.py @@ -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'])