resolve_conflicts() does not work because of an error at Line 58 of def valid_chain(self, chain)
Open
- Dominant language
- C#
- Stars
- 8k
- Forks
- 2.8k
- PR merge metrics
- No merged PRs in 30d
Description
resolve_conflicts() does not work because there is an error of 58 line.
https://github.com/dvf/blockchain/blob/master/blockchain.py#L58
...
if not self.valid_proof(last_block['proof'], block['proof'], last_block['previous_hash']):
...
should be
...
if not self.valid_proof(last_block['proof'], block['proof'], block['previous_hash']):
...
the parameter "last_block['previous_hash']" is wrong, should be "block['previous_hash']".
After I debug it, the code does work.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.