mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
tests: remove byte.hex() to keep compatibility
Use test_framework.util.bytes_to_hex_str() instead of bytes.hex() that new in Python 3.5, to support minimum version of Python(test).
This commit is contained in:
@@ -184,7 +184,7 @@ class MiningTest(BitcoinTestFramework):
|
||||
self.log.info('submitheader tests')
|
||||
assert_raises_rpc_error(-22, 'Block header decode failed', lambda: node.submitheader(hexdata='xx' * BLOCK_HEADER_SIZE))
|
||||
assert_raises_rpc_error(-22, 'Block header decode failed', lambda: node.submitheader(hexdata='ff' * (BLOCK_HEADER_SIZE-2)))
|
||||
assert_raises_rpc_error(-25, 'Must submit previous header', lambda: node.submitheader(hexdata=super(CBlock, bad_block).serialize().hex()))
|
||||
assert_raises_rpc_error(-25, 'Must submit previous header', lambda: node.submitheader(hexdata=b2x(super(CBlock, bad_block).serialize())))
|
||||
|
||||
block.nTime += 1
|
||||
block.solve()
|
||||
|
||||
Reference in New Issue
Block a user