From 36fbd0c6c16f4adb423e43185addd2f0316f0689 Mon Sep 17 00:00:00 2001 From: Artem Date: Tue, 10 Oct 2023 07:19:53 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D1=91?= =?UTF-8?q?=D0=BD=20PoW.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PoW.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PoW.py b/PoW.py index cb9c390..f136204 100644 --- a/PoW.py +++ b/PoW.py @@ -1,4 +1,4 @@ -import hashlib +import hashlib, sys def check(data, proof, complexity=1, f=hashlib.sha256): zeros="0"*complexity @@ -13,7 +13,7 @@ def check(data, proof, complexity=1, f=hashlib.sha256): return b>=complexity def mine(data, complexity=1, f=hashlib.sha256): - for a in range(0, 1000000000): + for a in range(0, sys.maxsize): if check(data, a, complexity, f): return a break