dvf / dvf/blockchain

resolve_conflicts() does not work because of an error at Line 58 of def valid_chain(self, chain)

Open
#66 6 comments 9 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.