remove binascii

This commit is contained in:
Jack Robison 2022-03-16 15:25:02 -04:00
parent ddf663b415
commit 9d6d9ff68f
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -1,6 +1,5 @@
import base64 import base64
from typing import List, TYPE_CHECKING, Union, Optional, NamedTuple from typing import List, TYPE_CHECKING, Union, Optional, NamedTuple
from binascii import hexlify
from itertools import chain from itertools import chain
from scribe.error import ResolveCensoredError from scribe.error import ResolveCensoredError
@ -151,7 +150,7 @@ class Outputs:
for txo_message in chain(outputs.txos, outputs.extra_txos): for txo_message in chain(outputs.txos, outputs.extra_txos):
if txo_message.WhichOneof('meta') == 'error': if txo_message.WhichOneof('meta') == 'error':
continue continue
txs.add((hexlify(txo_message.tx_hash[::-1]).decode(), txo_message.height)) txs.add((txo_message.tx_hash[::-1].hex(), txo_message.height))
return cls( return cls(
outputs.txos, outputs.extra_txos, txs, outputs.txos, outputs.extra_txos, txs,
outputs.offset, outputs.total, outputs.offset, outputs.total,
@ -164,7 +163,7 @@ class Outputs:
for txo_message in chain(outputs.txos, outputs.extra_txos): for txo_message in chain(outputs.txos, outputs.extra_txos):
if txo_message.WhichOneof('meta') == 'error': if txo_message.WhichOneof('meta') == 'error':
continue continue
txs.add((hexlify(txo_message.tx_hash[::-1]).decode(), txo_message.height)) txs.add((txo_message.tx_hash[::-1].hex(), txo_message.height))
return cls( return cls(
outputs.txos, outputs.extra_txos, txs, outputs.txos, outputs.extra_txos, txs,
outputs.offset, outputs.total, outputs.offset, outputs.total,