Skip to content

Commit fa1b63c

Browse files
author
MarcoFalke
committed
test: Replace hashlib.new with named constructor
1 parent 7ce8d74 commit fa1b63c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/functional/test_framework/messages.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,15 @@
6464

6565
WITNESS_SCALE_FACTOR = 4
6666

67-
# Serialization/deserialization tools
67+
6868
def sha256(s):
69-
return hashlib.new('sha256', s).digest()
69+
return hashlib.sha256(s).digest()
70+
7071

7172
def hash256(s):
7273
return sha256(sha256(s))
7374

75+
7476
def ser_compact_size(l):
7577
r = b""
7678
if l < 253:

0 commit comments

Comments
 (0)