diff --git a/blockchain.py b/blockchain.py index 4e92d07..d3b6d34 100644 --- a/blockchain.py +++ b/blockchain.py @@ -104,7 +104,7 @@ class Blockchain: 'timestamp': time(), 'transactions': self.current_transactions, 'proof': proof, - 'previous_hash': previous_hash or self.hash(self.chain[-1]), + 'previous_hash': previous_hash or self.hash(last_block), } # Reset the current list of transactions