0
0
Can anyone tell me what to do to publish if I mined a block
0
0
Can anyone tell me what to do to publish if I mined a block
1
Let's assume that you are solo-mining.
If you are a miner you need to run a Bitcoin Full-Node for example Bitcoin Core. If you do this you are a full part of the Bitcoin network.
If you mine a block, you do the following steps:
If this is done you broadcast the block to all nodes in the network the same way as broadcast a transaction. This means that all nodes are receiving this block. They are also checking it like if your block matches the difficulty and if the transaction are valid. Then they are adding it to their own local copy of the blockchain.
The nodes are broadcasting the blocks and transactions under each other. That's how peer to peer work. You should take a look at this
0
To actually publish the block onto the Bitcoin network, you can use the bitcoin-cli command submitblock. You would have to serialize all the data in the block into hex format first.