Closed hasezoey closed 5 years ago
-> i know that the check failed, i will fix it, when i get confirmation that it is not necessary
Why are you removing this check? It's possible that someone tried to tamper with a block by changing the hash.
because when trying to tamper with the current & previous hash(or anything else in the currentBlock) wouldnt it be already be catched by if (currentBlock.hash !== currentBlock.calculateHash())
or am i just thinking wrong on this?
Edit: i mean like, i cant think of any case where it will not be catched already
Ah, yes! You're absolutely right, because the previousHash is included when calculating the hash!
i couldnt think of any instance where "currentBlock.calculateHash" wouldnt fail and "previousBlock.calculateHash" would go in -> i could be wrong, just wanting to point this out (and when this and #23 the coverage would go up to nearly 100%)