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:
David W Grossman 2017-10-08 17:15:52 -04:00
parent 029350c7e6
commit d9f8529cef
1 changed files with 1 additions and 1 deletions

View File

@ -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: