Merge pull request #58 from shuheiktgw/change_to_use_last_block_method

Change to user last_block instead of self.chain[-1]
This commit is contained in:
Daniel van Flymen 2018-01-23 18:48:31 -05:00 committed by GitHub
commit bc75c76f98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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