<p>It doesn't matter if it's included in 10 blocks, as far as one of them will survive in the longest chain. </p>

<p>All others will be in obsolete forks or orphaned blocks.</p>

CC BY-SA 3.0
2016-10-25T12:31:18.203Z
2016-10-25T12:31:18.203Z
Farghaly
<p>In each blockchain branch there can only be one block at every height as every block references their ancestor.<br>
If a block includes a transaction that was already confirmed by one of their ancestors, the block is invalid. Invalid blocks are rejected by the nodes in the network. Therefore, one chain branch can never confirm the same transaction more than once.</p>

<p>If there are two blocks at the same height in the blockchain confirming the same transaction, that's fine. They are already competing as only one of them can be part of the longest chain anyway. The other will become stale as the majority chain moves forward.</p>

CC BY-SA 4.0
2020-03-13T19:52:15.787Z
So, if two miners create valids block in the same height, one of the will not gain reward for that mining?
Eduardo Pascual Aseff
CC BY-SA 4.0
2020-03-13T20:19:29.990Z
Correct, only one block can be part of the best chain at the same height. Block rewards only mature (become spendable) after 100 blocks, so the stale block's miner will not be able to spend theirs.
Murch
CC BY-SA 3.0
2016-10-25T17:45:40.103Z
2016-10-25T17:45:40.103Z
Murch
<p>It will be included in two (or more) different blocks. But only one of those blocks will propagated to the network and get picked up by other miners, become part of the "longest chain" and subsequently be extended. </p>

<p>So it doesn't matter if at any one time there are forks at the end of the "blockchain", it matters only that one representation is persistent. </p>

CC BY-SA 3.0
2016-10-25T11:10:55.263Z
2016-10-25T12:23:14.433Z
2016-10-25T12:23:14.433Z
smatthewenglish
<p>If two miners pick up exactly the same transaction for mining, how do we ensure that the transaction is not included in the two different blocks created by each of the two miners.</p>

<mining-theory>
Multiple Inclusion of Transactions in a block
user1432693
# Multiple Inclusion of Transactions in a block

(Asked by: username_0 on 2016-10-25)

If two miners pick up exactly the same transaction for mining, how do we ensure that the transaction is not included in the two different blocks created by each of the two miners.

**Tags:** mining-theory


---

## 3 answers

### Answer by username_1 on 2016-10-25. Score: 2

It doesn't matter if it's included in 10 blocks, as far as one of them will survive in the longest chain.

All others will be in obsolete forks or orphaned blocks.


---

### Answer by username_2 on 2016-10-25. Score: 2

In each blockchain branch there can only be one block at every height as every block references their ancestor.  
If a block includes a transaction that was already confirmed by one of their ancestors, the block is invalid. Invalid blocks are rejected by the nodes in the network. Therefore, one chain branch can never confirm the same transaction more than once.

If there are two blocks at the same height in the blockchain confirming the same transaction, that's fine. They are already competing as only one of them can be part of the longest chain anyway. The other will become stale as the majority chain moves forward.

> **Comments:**
> **username_3**: So, if two miners create valids block in the same height, one of the will not gain reward for that mining?  
> **username_2**: Correct, only one block can be part of the best chain at the same height. Block rewards only mature (become spendable) after 100 blocks, so the stale block's miner will not be able to spend theirs.  

---

### Answer by username_4 on 2016-10-25. Score: 1

It will be included in two (or more) different blocks. But only one of those blocks will propagated to the network and get picked up by other miners, become part of the "longest chain" and subsequently be extended.

So it doesn't matter if at any one time there are forks at the end of the "blockchain", it matters only that one representation is persistent.


---

