diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-08-21 16:29:48 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-08-21 16:29:55 +0200 |
commit | f5a406f003a060325128db47552089b3254044e3 (patch) | |
tree | 7395718a5c7572217ec9c7d71836d82448d68cc3 /src | |
parent | 4fc15d15667d9d9c4fb5515ce73c05b4596298ec (diff) | |
parent | 021daedfa100defad553d69cd3d628aaa5bc7caf (diff) |
Merge bitcoin/bitcoin#22633: refactor: Replace remaining binascii method calls
021daedfa100defad553d69cd3d628aaa5bc7caf refactor: replace remaining binascii method calls (Zero-1729)
Pull request description:
This PR removes the remaining `binascii` method calls outside `test/functional` and `test_framework`, as pointed out here https://github.com/bitcoin/bitcoin/pull/22619#pullrequestreview-722153458.
Follow-up to #22593 and #22619
Closes #22605
ACKs for top commit:
josibake:
re-ACK https://github.com/bitcoin/bitcoin/pull/22633/commits/021daedfa100defad553d69cd3d628aaa5bc7caf
theStack:
re-ACK 021daedfa100defad553d69cd3d628aaa5bc7caf
Tree-SHA512: 2ae9fee8917112c91a5406f219ca70f24cd8902b903db5a61fc2de85ad640d669a772f5c05970be0fcee6ef1cdd32fae2ca5d1ec6dc9798b43352c8160ddde6f
Diffstat (limited to 'src')
-rw-r--r-- | src/test/serfloat_tests.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/serfloat_tests.cpp b/src/test/serfloat_tests.cpp index 7876c0bcda..15612e2950 100644 --- a/src/test/serfloat_tests.cpp +++ b/src/test/serfloat_tests.cpp @@ -102,11 +102,12 @@ BOOST_AUTO_TEST_CASE(double_serfloat_tests) { Python code to generate the below hashes: def reversed_hex(x): - return binascii.hexlify(''.join(reversed(x))) + return bytes(reversed(x)).hex() + def dsha256(x): return hashlib.sha256(hashlib.sha256(x).digest()).digest() - reversed_hex(dsha256(''.join(struct.pack('<d', x) for x in range(0,1000)))) == '43d0c82591953c4eafe114590d392676a01585d25b25d433557f0d7878b23f96' + reversed_hex(dsha256(b''.join(struct.pack('<d', x) for x in range(0,1000)))) == '43d0c82591953c4eafe114590d392676a01585d25b25d433557f0d7878b23f96' */ BOOST_AUTO_TEST_CASE(doubles) { |