0

This question already has an answer here:

what happens when there is noone doing transactions and miners mine the blocks? Can they mine empty blocks? And how it works when there won't be any hash in empty block or there is a hash?

Thank you

marked as duplicate by JBaczuk, Raghav Sood, 0xb10c, Community Aug 29 '18 at 8:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

Can they mine empty blocks?

The miner must include a coinbase transaction (which determines the mining reward), or the block will be rejected by the network. That way, the miner is awarded coins for solving a block (even if it contains no other transactions) and coins are distributed according to consensus rules.

And how it works when there won't be any hash in empty block or there is a hash?

There is still other data that is hashed, including:

version, previous block hash, merkle root, unix epoch time, difficulty target (bits), and nonce.

The merkle root including only the coinbase transaction in this example.

Not the answer you're looking for? Browse other questions tagged or ask your own question.