The next thing that is required to synchronize the network is to update the /mine endpoint. We are also going to add a new endpoint, called /receive-new-block. There's a need to update the /mine endpoint so that whenever a new block is created by a node, that new block is broadcast to all the other nodes in the network. This means that every node on the network is aware that a new block has been created and all the nodes hosting the blockchain stay synchronized.
Updating the mining information
The updated mining process
Whenever a new block is mined, it will be mined on a particular node. To understand the updated mining process, let's assume that we want a node, hosted on port 3001, to mine a new block for the blockchain...