Open koshikraj opened 6 years ago
Can someone verify this issue?
I have no such issue.
@gentleKun , This issue is due to stringifying the unordered dictionary. May not be reproducible every time. It is always safer to compare the hash value instead which proves the integrity.
I know the question where it is , and i have modified it in my file main.js file.
Created 2 nodes, node1 has 41 blocks created using mineBlock API node2 has only genesis block when node 2 is connected to peer node1, it gives following error and fails to replace the blockchain
blockchain possibly behind. We got: 0 Peer got: 41 Received blockchain is longer than current blockchain Received blockchain invalid
The error is likely to be because of the first condition in isValidChain when called from replacechain.
Performing a JSON.stringify on an object will not always give the same value as objects are unordered.