From 9d6d9ff68fe509c2f65474598227fbd0e61c28c7 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Wed, 16 Mar 2022 15:25:02 -0400 Subject: [PATCH] remove binascii --- scribe/schema/result.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scribe/schema/result.py b/scribe/schema/result.py index 8d4865c..e51c86d 100644 --- a/scribe/schema/result.py +++ b/scribe/schema/result.py @@ -1,6 +1,5 @@ import base64 from typing import List, TYPE_CHECKING, Union, Optional, NamedTuple -from binascii import hexlify from itertools import chain from scribe.error import ResolveCensoredError @@ -151,7 +150,7 @@ class Outputs: for txo_message in chain(outputs.txos, outputs.extra_txos): if txo_message.WhichOneof('meta') == 'error': 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( outputs.txos, outputs.extra_txos, txs, outputs.offset, outputs.total, @@ -164,7 +163,7 @@ class Outputs: for txo_message in chain(outputs.txos, outputs.extra_txos): if txo_message.WhichOneof('meta') == 'error': 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( outputs.txos, outputs.extra_txos, txs, outputs.offset, outputs.total,