Исправлен баг

This commit is contained in:
Artem 2023-10-09 20:22:02 +03:00
parent 0ac5fc8922
commit 51732f5e7d

2
PoW.py
View File

@ -2,7 +2,7 @@ import hashlib
def check(data, proof, complexity=1, f=hashlib.sha256): def check(data, proof, complexity=1, f=hashlib.sha256):
zeros="0"*complexity zeros="0"*complexity
hash=f((proof+data).encode()) hash=f((str(proof)+data).encode())
hashdata=hash.hexdigest() hashdata=hash.hexdigest()
b=0 b=0
for a in hashdata: for a in hashdata: