change to user last_block instead of self.chain[-1]

This commit is contained in:
Shuhei Kitagawa 2018-01-11 09:31:24 +09:00
parent 4010cf3273
commit 36d30167cd
1 changed files with 1 additions and 1 deletions

View File

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