If all the miners are working on adding to the central blockchain, what happens if a miner (A) submits their valid block just seconds after another miner's block (B) has been accepted and added to the chain?

Since the new hash-value of the last block in the chain changes with the newly accepted block (B), does that make the computed hash (A) invalid?


Blockchains can conceptually easily acquire two or more heads if blocks are solved at the same time. Eventually one of the heads will grow longer than the other, in which case the transactions in the shorter one cease to have ever happened as miners switch to working on the longer one.. This is one reason to wait for a reasonable number of confirmations (blocks on top of your block) before letting the guy drive away in the car he just paid bitcoins for :)

There's another stackexchange thread discussing the longest orphaned chain heads - What is the longest blockchain fork that has been orphaned to date?

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