What happens to a double spend during a fork where one of the transactions are in a orphaned block and the other in the main chain?

2 transactions get broadcasted in the network and 2 conflicting blocks gets mined at the same time. The transaction that gets broadcasted first is for the seller and the second transaction is fraudulent. First transaction gets in the orphaned block and the second transaction goes in a block that becomes part of the main chain.

With the knowledge I have now, I assume the 2nd transaction is considered valid. While the first one gets returned to the memory pool and the pool sees that there is already a transaction in the main chain so it gets dropped. Is this true? And how do the confirmations show up?

1 Answer 1


Yes, what you wrote is correct.

The number of confirmations a block has is defined as the number of block building on top of it.

The number of confirmations a transaction has is defined as 0 if the transactions is not included in any block and as the number of confirmations the oldest block* (block with the lowest block number; it's not about time) containing it has + 1 otherwise.

You know how many confirmations a block or a transaction has by knowing a (usually "the") longest blockchain has.

* Note that in any blockchain, a transaction is included in at most 1 block but there can be different blockchains and a transaction can be included in blocks having different block numbers in different blockchains.

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .