1

What if a miner starts to generate a new block hash based on trans data,latest block hash , timestamp and nonce , then in the middle of the work a new block has been added by another miner. in this case will the block be invalid as it hold a previous hash value which is not the latest block ?

2

in this case will the block be invalid as it hold a previous hash value which is not the latest block?

Yes. The miner will construct a new block template, that builds off the newest valid block, and continue to mine on the new template.

If they continued to mine on the old block, they would likely end up wasting resources, as the rest of the network will have begun following the new, longer (more work) chain.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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