aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/test_framework/util.py')
-rw-r--r--test/functional/test_framework/util.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py
index a9a6adcfc8..54f2fdee21 100644
--- a/test/functional/test_framework/util.py
+++ b/test/functional/test_framework/util.py
@@ -5,7 +5,6 @@
"""Helpful routines for regression testing."""
from base64 import b64encode
-from binascii import unhexlify
from decimal import Decimal, ROUND_DOWN
from subprocess import CalledProcessError
import hashlib
@@ -214,10 +213,6 @@ def count_bytes(hex_string):
return len(bytearray.fromhex(hex_string))
-def hex_str_to_bytes(hex_str):
- return unhexlify(hex_str.encode('ascii'))
-
-
def str_to_b64str(string):
return b64encode(string.encode('utf-8')).decode('ascii')
@@ -517,7 +512,7 @@ def gen_return_txouts():
from .messages import CTxOut
txout = CTxOut()
txout.nValue = 0
- txout.scriptPubKey = hex_str_to_bytes(script_pubkey)
+ txout.scriptPubKey = bytes.fromhex(script_pubkey)
for _ in range(128):
txouts.append(txout)
return txouts