Broadcasting
A user node can mine a block for transactions itself or propagate transactions to the blockchain network so that some other node can mine the transactions. Our blockchain application has only communicated block information so far. Since not all transaction creators want to mine blocks themselves, transactions need to communicate to the nodes. We will add two more message types to the application. Refer to the message types described in Chapter 4, Networking in Blockchain, for more details.
These are the formats of query and response messages that will be exchanged between the nodes. Similar to the broadcasting of blocks, transactions are broadcast when a new transaction is created by a node and when it receives an unconfirmed ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access