<p>The second time the transaction appears in a block the outputs it claims are already marked as claimed, hence the transaction, seen a second time, would be invalid. By definition the block is only valid if all transactions in it are valid.</p>

<p>The only way of a transaction landing in two potentially valid blocks is during a blockchain fork, where the two competing blockchain heads both include the transaction.</p>

<p>If a miner were to include an already confirmed transaction it would invalidate the block, and he would lose its reward. Notice that this also avoids having a miner claim fees multiple times, which would effectively create new coins from thin air.</p>

CC BY-SA 3.0
2013-12-13T08:59:28.790Z
2013-12-13T08:59:28.790Z
cdecker
<p>What happens with a valid block which contains a transaction which was already included in previous blocks? Is such a block accepted by other nodes in the network or discarded?</p>

<transactions><confirmations><blockchain-fork><consensus><validation>
Can a transaction be in two blocks?
dijxtra
# Can a transaction be in two blocks?

(Asked by: username_0 on 2013-12-13)

What happens with a valid block which contains a transaction which was already included in previous blocks? Is such a block accepted by other nodes in the network or discarded?

**Tags:** transactions, confirmations, blockchain-fork, consensus, validation


---

## 1 answers

### Answer by username_1 on 2013-12-13. Score: 2 | Accepted answer

The second time the transaction appears in a block the outputs it claims are already marked as claimed, hence the transaction, seen a second time, would be invalid. By definition the block is only valid if all transactions in it are valid.

The only way of a transaction landing in two potentially valid blocks is during a blockchain fork, where the two competing blockchain heads both include the transaction.

If a miner were to include an already confirmed transaction it would invalidate the block, and he would lose its reward. Notice that this also avoids having a miner claim fees multiple times, which would effectively create new coins from thin air.


---

