anders94 / blockchain-demo

A web-based demonstration of blockchain concepts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

potential double-spending?

zhiqihuang opened this issue · comments

commented

Thanks for making this wonderful demo.

I have a question about how to prevent double-spending.

In coinbase block #5, if I change the first transaction to "$2000.00 from Jackson to Alexander", it will pass at nonce=10042. Since Jackson does not have 2000, do we have a double-spending issue here?

No, because the other peers don't agree on the final block's hash.