<p><em>Updated as my earlier answer was wrong</em></p>

<p>Quoting from <a href="https://en.bitcoin.it/wiki/BIP_0030" rel="noreferrer">BIP 0030</a>:</p>

<blockquote>
  <p>Blocks are not allowed to contain a transaction whose identifier matches that of an earlier, not-fully-spent transaction in the same chain.</p>
  
  <p>This rule is to be applied to all blocks whose timestamp is after a point in time</p>
</blockquote>

<p>This means that a transaction can have the same hash multiple times as long as it's always spent first before the new transaction is created.</p>

<p>As for the older transactions: they are valid but the network won't let you spend them because the implementation in the reference client won't let you.</p>

CC BY-SA 3.0
2013-07-05T19:20:08.013Z
So, they can be spent in theory but not in practice (most likely)?
Mike
CC BY-SA 3.0
2013-07-05T19:31:36.060Z
@Mike updated my answer with more concrete info
Tom van der Woerdt
CC BY-SA 3.0
2013-07-05T19:07:12.737Z
2013-07-05T19:31:27.123Z
2013-07-05T19:31:27.123Z
Tom van der Woerdt
<p>I've noticed that there are two transaction hashes that appear more than once in the blockchain. The reason for this is understandable: they sent mining rewards to the same address. These transactions had the same inputs (none) and the same outputs (one 50 BTC output to the specified address). However, this does cause a problem when you're trying to work with transaction data, as the transaction hashes cannot be considered unique identifiers of a transaction.</p>

<p>This was briefly discussed <a href="https://bitcoin.stackexchange.com/questions/3030/two-blocks-two-transactions-same-hash">here</a>, but the discussion was based more on block validity.</p>

<p>This actually led to a bug that caused an overwrite of the older transaction, which was <a href="https://bitcointalk.org/index.php?topic=67738.0" rel="nofollow noreferrer">fixed</a> in the 0.6.0 release.</p>

<p>There were a few BitcoinTalk threads about one of these occurrences:
<a href="https://bitcointalk.org/index.php?topic=9680.0;wap2" rel="nofollow noreferrer">BitcoinTalk</a>
<a href="https://bitcointalk.org/index.php?topic=63308.30;wap2" rel="nofollow noreferrer">Other BitcoinTalk</a></p>

<p>In the first of these threads, Gavin Andresen seems to suggest that the newer transaction's output can't be spent by saying "Ooh!  Ooh!  50 more bitcoins for the 'Bitcoins Lost Forever' thread!".</p>

<p>The two transaction hashes that have appeared more than once in the blockchain are:
d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599
e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468</p>

<p>So, can these transaction outputs be spent? Why, or why not?</p>

<p>EDIT: I should mention that I checked, and as of July 5, 2013, none of the transactions' outputs have been spent.</p>

<protocol><utxo>
Can the outputs of transactions with duplicate hashes be spent?
Mike
# Can the outputs of transactions with duplicate hashes be spent?

(Asked by: username_0 on 2013-07-05)

I've noticed that there are two transaction hashes that appear more than once in the blockchain. The reason for this is understandable: they sent mining rewards to the same address. These transactions had the same inputs (none) and the same outputs (one 50 BTC output to the specified address). However, this does cause a problem when you're trying to work with transaction data, as the transaction hashes cannot be considered unique identifiers of a transaction.

This was briefly discussed [here](https://bitcoin.stackexchange.com/questions/3030/two-blocks-two-transactions-same-hash), but the discussion was based more on block validity.

This actually led to a bug that caused an overwrite of the older transaction, which was [fixed](https://bitcointalk.org/index.php?topic=67738.0) in the 0.6.0 release.

There were a few BitcoinTalk threads about one of these occurrences:
[BitcoinTalk](https://bitcointalk.org/index.php?topic=9680.0;wap2)
[Other BitcoinTalk](https://bitcointalk.org/index.php?topic=63308.30;wap2)

In the first of these threads, Gavin Andresen seems to suggest that the newer transaction's output can't be spent by saying "Ooh! Ooh! 50 more bitcoins for the 'Bitcoins Lost Forever' thread!".

The two transaction hashes that have appeared more than once in the blockchain are:
d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599
e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468

So, can these transaction outputs be spent? Why, or why not?

EDIT: I should mention that I checked, and as of July 5, 2013, none of the transactions' outputs have been spent.

**Tags:** protocol, utxo


---

## 1 answers

### Answer by username_1 on 2013-07-05. Score: 6 | Accepted answer

*Updated as my earlier answer was wrong*

Quoting from [BIP 0030](https://en.bitcoin.it/wiki/BIP_0030):

> Blocks are not allowed to contain a transaction whose identifier matches that of an earlier, not-fully-spent transaction in the same chain.
>
> This rule is to be applied to all blocks whose timestamp is after a point in time

This means that a transaction can have the same hash multiple times as long as it's always spent first before the new transaction is created.

As for the older transactions: they are valid but the network won't let you spend them because the implementation in the reference client won't let you.

> **Comments:**
> **username_0**: So, they can be spent in theory but not in practice (most likely)?  
> **username_1**: @username_0 updated my answer with more concrete info  

---

