diff options
author | Zero-1729 <zero1729@protonmail.com> | 2021-08-16 19:30:44 +0100 |
---|---|---|
committer | Zero-1729 <zero1729@protonmail.com> | 2021-08-16 19:30:56 +0100 |
commit | 021daedfa100defad553d69cd3d628aaa5bc7caf (patch) | |
tree | aea7f9c78aa5e73073d26bfff3e2357986a8e056 /test/functional | |
parent | f4328ebef52f51a5ee45cc42815c91ccd28b0669 (diff) |
refactor: replace remaining binascii method calls
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/test_framework/messages.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index 6e57107f86..65d90f8448 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -19,7 +19,6 @@ Classes use __slots__ to ensure extraneous attributes aren't accidentally added by tests, compromising their intended effect. """ from base64 import b32decode, b32encode -from codecs import encode import copy import hashlib from io import BytesIO @@ -681,7 +680,7 @@ class CBlockHeader: r += struct.pack("<I", self.nBits) r += struct.pack("<I", self.nNonce) self.sha256 = uint256_from_str(hash256(r)) - self.hash = encode(hash256(r)[::-1], 'hex_codec').decode('ascii') + self.hash = hash256(r)[::-1].hex() def rehash(self): self.sha256 = None |