Новая функция

This commit is contained in:
Artem 2023-10-09 20:17:21 +03:00
parent 4a8e4a810e
commit 0ac5fc8922

6
PoW.py
View File

@ -11,3 +11,9 @@ def check(data, proof, complexity=1, f=hashlib.sha256):
else: else:
break break
return b>=complexity return b>=complexity
def mine(data, complexity=1, f=hashlib.sha256):
for a in range(0, 1000000000):
if check(data, a, complexity, f):
return a
break