diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-12-09 14:39:20 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-12-09 14:36:06 +0100 |
commit | fa1b63c01887adff83f16b1bbba3bd159dc51104 (patch) | |
tree | bdd28952f1bdbe514b530c078d17364edc63c009 /test/functional/test_framework/messages.py | |
parent | 7ce8d74156abab75ee23eeac74a7b31cce64147a (diff) |
test: Replace hashlib.new with named constructor
Diffstat (limited to 'test/functional/test_framework/messages.py')
-rwxr-xr-x | test/functional/test_framework/messages.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index 71ac5c5bfd..e3599cad49 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -64,13 +64,15 @@ FILTER_TYPE_BASIC = 0 WITNESS_SCALE_FACTOR = 4 -# Serialization/deserialization tools + def sha256(s): - return hashlib.new('sha256', s).digest() + return hashlib.sha256(s).digest() + def hash256(s): return sha256(sha256(s)) + def ser_compact_size(l): r = b"" if l < 253: |