test: Properly deserialize integers in little-endian

This commit is contained in:
MarcoFalke 2019-11-25 15:30:01 -05:00
parent fa94fc10c8
commit fad9fdbea5
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -151,7 +151,7 @@ class RESTTest (BitcoinTestFramework):
bin_response = self.test_rest_request("/getutxos", http_method='POST', req_type=ReqType.BIN, body=bin_request, ret_type=RetType.BYTES)
output = BytesIO(bin_response)
chain_height, = unpack("i", output.read(4))
chain_height, = unpack("<i", output.read(4))
response_hash = output.read(32)[::-1].hex()
assert_equal(bb_hash, response_hash) # check if getutxo's chaintip during calculation was fine