1
0

rename crypto.Hash to sha256d

This commit is contained in:
SomberNight
2018-10-25 22:28:24 +02:00
parent a88a2dea82
commit 082a83dd85
11 changed files with 40 additions and 42 deletions

View File

@@ -25,7 +25,8 @@ import threading
from typing import Optional, Dict
from . import util
from .bitcoin import Hash, hash_encode, int_to_hex, rev_hex
from .bitcoin import hash_encode, int_to_hex, rev_hex
from .crypto import sha256d
from . import constants
from .util import bfh, bh2u
from .simple_config import SimpleConfig
@@ -71,7 +72,7 @@ def hash_header(header: dict) -> str:
return '0' * 64
if header.get('prev_block_hash') is None:
header['prev_block_hash'] = '00'*32
return hash_encode(Hash(bfh(serialize_header(header))))
return hash_encode(sha256d(bfh(serialize_header(header))))
blockchains = {} # type: Dict[int, Blockchain]