<p>Miners are not obligated to include any specific transaction in a block.    </p>

<p>If one person gets a headstart then any non mining node will not relay the duplicate so the "first mover" will quickly cut off portions of the network from other contenders. However if both transacitons are create at roughly the same time it is possible that each duplicate transaction will reach the nodes that support mining pool(s) via different routes.  </p>

<p>A mining pool can include any transaction they wish and tend to run customized versions of the bitcoind to optimize block generation.  It is in the miner's best interest to take the transaction with the higher fee at the detrimnent of other transactions.  Thus using a transaction fee could increase the chance of being included in the next block.</p>

<p>Utltimately the transaction included in the block will resolve the "race".</p>

CC BY-SA 3.0
2012-03-29T12:35:35.467Z
The network "cut off" might be bypassed by sending TXs directly to the pools.
kermit
CC BY-SA 3.0
2011-11-04T19:24:20.123Z
2011-11-04T19:24:20.123Z
DeathAndTaxes
<p>When a node receives two conflicting transactions, it will only relay the first one that it received, dropping the other.  If one transaction fully propagates through the network before the other is sent, the first will prevent the second from ever reaching any miner nodes.</p>

<p>If both transactions are sent at roughly the same time, the network will be in disagreement about which one is valid.  This will be resolved once a miner node finds a block and includes whichever transaction it had first heard about.</p>

CC BY-SA 3.0
2011-09-12T01:53:30.957Z
2011-09-12T01:53:30.957Z
xyz
<p>Suppose I publish the private key of an address that contains 1 bitcoin. If two people try to transfer this bitcoin to another address before a new block is found, who gets it? How is this decision made?</p>

CC BY-SA 3.0
2011-09-12T02:37:26.843Z
possible duplicate: http://bitcoin.stackexchange.com/questions/730/what-does-the-bitcoin-client-do-when-it-receives-conflicting-transactions
Thilo
<transactions><doublespend><transaction-selection>
In a double spend attempt, how is the valid transaction chosen?
nmat
# In a double spend attempt, how is the valid transaction chosen?

(Asked by: username_0 on 2011-09-12)

Suppose I publish the private key of an address that contains 1 bitcoin. If two people try to transfer this bitcoin to another address before a new block is found, who gets it? How is this decision made?

**Tags:** transactions, doublespend, transaction-selection

> **Comments:**
> **username_1**: possible duplicate: http://bitcoin.stackexchange.com/questions/730/what-does-the-bitcoin-client-do-when-it-receives-conflicting-transactions  

---

## 2 answers

### Answer by username_4 on 2011-09-12. Score: 7 | Accepted answer

When a node receives two conflicting transactions, it will only relay the first one that it received, dropping the other. If one transaction fully propagates through the network before the other is sent, the first will prevent the second from ever reaching any miner nodes.

If both transactions are sent at roughly the same time, the network will be in disagreement about which one is valid. This will be resolved once a miner node finds a block and includes whichever transaction it had first heard about.


---

### Answer by username_2 on 2011-11-04. Score: 2

Miners are not obligated to include any specific transaction in a block.

If one person gets a headstart then any non mining node will not relay the duplicate so the "first mover" will quickly cut off portions of the network from other contenders. However if both transacitons are create at roughly the same time it is possible that each duplicate transaction will reach the nodes that support mining pool(s) via different routes.

A mining pool can include any transaction they wish and tend to run customized versions of the bitcoind to optimize block generation. It is in the miner's best interest to take the transaction with the higher fee at the detrimnent of other transactions. Thus using a transaction fee could increase the chance of being included in the next block.

Utltimately the transaction included in the block will resolve the "race".

> **Comments:**
> **username_3**: The network "cut off" might be bypassed by sending TXs directly to the pools.  

---

