daxeel / blockshell

🎉 Minimal Blockchain Learning CLI
MIT License
1.38k stars 121 forks source link

Don't you have to add self.previousHash? #2

Closed ahanikel closed 6 years ago

ahanikel commented 6 years ago

I'm sorry in advance if I'm wrong, but don't you also need to add self.previousHash to hashData at https://github.com/daxeel/blockshell/blob/6aa5eec11aa107f754e2abdc86e79c4249578c2c/blockchain/chain.py#L19 ?

daxeel commented 6 years ago

@ahanikel Thanks for your report. PreviousHash must be in hash calculation. You are welcome to submit PR with this edit.

ahanikel commented 6 years ago

Ok, done. Thanks a lot for your work, I'm sure many people (including myself) benefit from it!