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:
parent
7ce8d74156
commit
fa1b63c018
1 changed files with 4 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue