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 you to do is to go to our createTransaction method in our blockchain data structure, and then find a way to verify that the...