Python code makes it really simple:
Code:
def checkwork(block, difficulty_rep):
s = hashlib.sha256(block.decode('hex'))
val = int(s.hexdigest(), 16)
diff = int(difficulty_rep, 16)
return val < diff
Bitcoin Forum |
![]() |
June 22, 2024, 09:42:07 AM
![]() |
|||
|
News: Voting for pizza day contest |
Home | Help | Search | Login | Register | More |
|