Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isChainValid should check that previousHash matches the hash of its previous block? #45

Closed
ilcasinistareloaded opened this issue May 18, 2021 · 3 comments

Comments

@ilcasinistareloaded
Copy link

Hello again, maybe it is not an issue and I'm missing something, but shouldn't method isChainValid also check that for each block in the chain its Block.previousHash actually match the Block.hash of its previous block? Great work, again.

@Savjee
Copy link
Owner

Savjee commented May 19, 2021

It should, yes!

Can you submit a pull request for this?

@ilcasinistareloaded
Copy link
Author

Oh, thanks for the offer but I don't know JavaScript; I translated it in a functional language to make it easier to understand (that's the reason of my odd second question in my previous issue: poor understanding of js). So, sorry but I can't help. Thanks for the quick reply!

@Savjee
Copy link
Owner

Savjee commented Jul 2, 2021

This has been fixed by @jhonderson

@Savjee Savjee closed this as completed Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants