<p>Yes, what you wrote is correct.</p>

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

<p>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.</p>

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

<p>* 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.</p>

CC BY-SA 3.0
2017-02-27T18:00:19.863Z
2017-02-27T18:00:19.863Z
UTF-8
<p>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?</p>

<p>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.</p>

<p>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?</p>

<transactions><blockchain-fork><doublespend><stale-block>
Double spend question during fork
Zhanyi
# Double spend question during fork

(Asked by: username_0 on 2017-02-27)

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?

**Tags:** transactions, blockchain-fork, doublespend, stale-block


---

## 1 answers

### Answer by username_1 on 2017-02-27. Score: 0 | Accepted answer

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.


---

