Savjee / SavjeeCoin

A simple blockchain in Javascript. For educational purposes only.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

update code to newest concepts

belun opened this issue · comments

commented

https://github.com/SavjeeTutorials/SavjeeCoin/blob/552d7ce2d65ab6c489ef48ebb89c5e6ac77a8960/src/main-v3.js#L21
you are hashing the old "data" field, instead of the transactions field ( quite a big deal, since you have compromised your chain)

https://github.com/SavjeeTutorials/SavjeeCoin/blob/552d7ce2d65ab6c489ef48ebb89c5e6ac77a8960/src/main-v3.js#L44
also, the genesis block is initialized badly ( not so big deal )

( maybe make some unit tests next tutorial :D )

Thanks! Jeez I really messed up!

The hashing is fixed in 4c351df
And the Genesis block has been cleaned up in 9a3ca7b

Thanks for reporting this!