From d33e68d5e2a80aa48942bf05ab5807867bf91f1b Mon Sep 17 00:00:00 2001 From: SamarthPardhi <67687817+SamarthPardhi@users.noreply.github.com> Date: Fri, 13 Aug 2021 20:40:58 +0530 Subject: [PATCH] Update mining.py We do not need to convert those hashes in hex to integers, this will increase the hash rate significantly. --- mining.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mining.py b/mining.py index d93c632..644b6b8 100644 --- a/mining.py +++ b/mining.py @@ -6,7 +6,7 @@ def get_sha_256_hash(input_value): def block_hash_less_than_target(block_hash, given_target): - return int(block_hash, 16) < int(given_target, 16) + return '0x' + block_hash < given_target # Initial block data (the transactions' merkle tree root, timestamp, client version, hash of the previous block)