From 36d30167cd170ad59322d6964d06d53e70373a0e Mon Sep 17 00:00:00 2001 From: Shuhei Kitagawa Date: Thu, 11 Jan 2018 09:31:24 +0900 Subject: [PATCH] change to user last_block instead of self.chain[-1] --- blockchain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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