aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/script.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/test_framework/script.py')
-rw-r--r--test/functional/test_framework/script.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/functional/test_framework/script.py b/test/functional/test_framework/script.py
index 012c80a1be..f7df7d23f5 100644
--- a/test/functional/test_framework/script.py
+++ b/test/functional/test_framework/script.py
@@ -9,7 +9,6 @@ This file is modified from python-bitcoinlib.
from .messages import CTransaction, CTxOut, sha256, hash256, uint256_from_str, ser_uint256, ser_string
-from binascii import hexlify
import hashlib
import struct
@@ -452,7 +451,7 @@ class CScript(bytes):
# Python 3.4 compatibility
def hex(self):
- return hexlify(self).decode('ascii')
+ return self.hex()
def __new__(cls, value=b''):
if isinstance(value, bytes) or isinstance(value, bytearray):
@@ -545,7 +544,7 @@ class CScript(bytes):
def __repr__(self):
def _repr(o):
if isinstance(o, bytes):
- return "x('%s')" % hexlify(o).decode('ascii')
+ return "x('%s')" % o.hex()
else:
return repr(o)