0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-09 10:43:19 -05:00

test: Replace hashlib.new with named constructor

This commit is contained in:
MarcoFalke 2021-12-09 14:39:20 +01:00
parent 7ce8d74156
commit fa1b63c018
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -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: