Question Description

I’m working on a c programming discussion question and need support to help me learn.

Write a program that simulates a bitcoin miner. Your program must be compiled to an executable calledminer. The program will read in a sequence of four kinds of events

(i) mine a block (mine),

(ii) receive atransaction and add it to the mempool (transaction),

iii) receive a block that was mined by another miner(block), and

(iv) end the simulation (end). For each of these events your program will need to perform aspecific action as described below. These events correspond to actual events experienced by a real miner.For example, the transaction and block events correspond to the miner receiving transactions and blocksfrom the peer-to-peer network, and the mine event corresponds to the miner deciding to begin the cre ation of a new block.On a mine event, your program must1. select transactions from its mempool in the order that the transactions were added2. create a new block from the selected transactions3. remove the selected transactions from the mempool4. print out the created block On a transaction event, your program must1. decode the transaction in the event2. add the transaction to the mempool3. print out the transactionOn a block event, your program must1. decode the block. In the event2. remove any transactions in the mempool that were listed in the block3. print out the removed transactions in the order they were listed in the blockOn an end event, your program must1. exitNote: the simulator will focus on the high-level operations. It will not need to perform any cryptographicfunctions or verify the correctness of a block or transaction

"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now