Now, when we run this file, we should receive verification of a valid blockchain, because we didn't tamper with it and created it legitimately, using all of the correct methods. Let's verify whether or not the chainIsValid method works correctly:
- Head over to the Terminal and cancel the previous processes that were running by typing ^C in the Terminal.
- Once the processes are cancelled, then in the Terminal, let's type node dev/test.js and press Enter. As we haven't tampered with the blockchain, we'll get the Valid: true response, as seen in the following screenshot:
Now, let's tamper with the blockchain ...