rename crypto.Hash to sha256d
This commit is contained in:
@@ -27,7 +27,7 @@ from typing import Sequence, Optional, TYPE_CHECKING
|
||||
import aiorpcx
|
||||
|
||||
from .util import bh2u, VerifiedTxInfo, NetworkJobOnDefaultServer
|
||||
from .crypto import Hash
|
||||
from .crypto import sha256d
|
||||
from .bitcoin import hash_decode, hash_encode
|
||||
from .transaction import Transaction
|
||||
from .blockchain import hash_header
|
||||
@@ -140,7 +140,7 @@ class SPV(NetworkJobOnDefaultServer):
|
||||
raise MerkleVerificationFailure(e)
|
||||
|
||||
for i, item in enumerate(merkle_branch_bytes):
|
||||
h = Hash(item + h) if ((leaf_pos_in_tree >> i) & 1) else Hash(h + item)
|
||||
h = sha256d(item + h) if ((leaf_pos_in_tree >> i) & 1) else sha256d(h + item)
|
||||
cls._raise_if_valid_tx(bh2u(h))
|
||||
return hash_encode(h)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user