Areas of improvement

Now, there are a few areas where the blockchain could be improved. One of those areas is in error handling. Throughout this book, we didn't do much error handling, because we were focusing on getting the actual functionalities to work correctly, but to improve this blockchain we would definitely want to do a lot of error handling. This would ensure that our blockchain can't be hacked, and also make sure that it runs correctly.

Another area where this blockchain could be improved is when we are making transactions. Right now, when we make transactions, we send a certain amount of Bitcoin from one person to another, but at no point do we validate that the sender actually has this bitcoin to send.

One exercise we would encourage ...

Get Learn Blockchain Programming with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.