Testing the endpoints

In this section, we're going to be testing our /mine endpoint, along with our /transaction and /blockchain endpoints, to make sure that everything works well together. 

Before we test, it would be a good idea to take out the console.log statement in the proofOfWork method. This is because having it will just make your program work harder, and it will therefore take more time to calculate things.

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.