Corrected bug in proof_of_work: last_hash does not depend on the previous hash of last_block, but instead just on the hash of last_block. Thank you ashleyniemerg
This commit is contained in:
parent
029350c7e6
commit
d9f8529cef
|
@ -159,7 +159,7 @@ class Blockchain(object):
|
|||
"""
|
||||
|
||||
last_proof = last_block['proof']
|
||||
last_hash = last_block['previous_hash']
|
||||
last_hash = self.hash(last_block)
|
||||
|
||||
proof = 0
|
||||
while self.valid_proof(last_proof, proof, last_hash) is False:
|
||||
|
|
Loading…
Reference in New Issue