mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
sdsadsadasdas a
This commit is contained in:
parent
2fe3ddf1c5
commit
f26b232ff8
1 changed files with 2 additions and 1 deletions
|
@ -83,7 +83,7 @@ def hash_header(header: dict) -> str:
|
|||
def pow_hash_header(header: dict) -> str:
|
||||
if header is None:
|
||||
return '0' * 64
|
||||
return hash_encode(PoWHash(bfh(header['hex'])))
|
||||
return hash_encode(PoWHash(bfh(serialize_header(header))))
|
||||
|
||||
def sha256(x):
|
||||
return hashlib.sha256(x).digest()
|
||||
|
@ -103,6 +103,7 @@ def hash_raw_header(header: str) -> str:
|
|||
return hash_encode(sha256d(bfh(header)))
|
||||
|
||||
def PoWHash(x):
|
||||
x = x.encode('utf-8')
|
||||
r = sha512(Hash(x))
|
||||
r1 = ripemd160(r[:len(r) / 2])
|
||||
r2 = ripemd160(r[len(r) / 2:])
|
||||
|
|
Loading…
Add table
Reference in a new issue