bitcoin.py/transaction.py: API changes: rm most hex usage
Instead of some functions operating with hex strings, and others using bytes, this consolidates most things to use bytes. This mainly focuses on bitcoin.py and transaction.py, and then adapts the API usages in other files. Notably, - scripts, - pubkeys, - signatures should be bytes in almost all places now.
This commit is contained in:
@@ -21,7 +21,7 @@ async def f():
|
||||
results = await network.send_multiple_requests(peers, 'blockchain.headers.subscribe', [])
|
||||
for server, header in sorted(results.items(), key=lambda x: x[1].get('height')):
|
||||
height = header.get('height')
|
||||
blockhash = hash_raw_header(header.get('hex'))
|
||||
blockhash = hash_raw_header(bytes.fromhex(header.get('hex')))
|
||||
print(server, height, blockhash)
|
||||
finally:
|
||||
stopping_fut.set_result(1)
|
||||
|
||||
Reference in New Issue
Block a user