<p>No that would not be valid, the node would reject the second transaction it saw, because it would know the UTXO was already spent by the first one. If a miner tries to include both in a block, that block would be invalid too for the same reason. </p>

<p>The exception is if the first transaction signalled to opt in to Replace-by-fee and the second transaction had a high enough fee to replace the first one. (<a href="https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki" rel="nofollow noreferrer">BIP 125</a>)</p>

CC BY-SA 3.0
2017-10-22T09:22:57.633Z
2017-10-22T09:22:57.633Z
meshcollider
<p>I'm learning how the blockchain works. I've read that when someone (say Alice) send twice a transaction to two different peoples (Bob and Charlie) such that Alice has only enough to pay Bob or Charlie, not both, then the first validated block containing of the two transactions will be accepted and the other will be rejected.</p>

<p>My question is : What happens if the two transactions Alice -> Bob AND Alice -> Charlie are sent to the same node and that node validates its block ? Is it possible ? If not, why ?</p>

CC BY-SA 3.0
2017-10-22T09:20:27.353Z
You should learn more about how bitcoin works. Your question does not have any sense.
amaclin
CC BY-SA 3.0
2017-10-22T09:46:43.067Z
Well, I received an answer with sense. I'm learning but it's not that easy when english is my only source of information and not a languague I master.
Mourad Qqch
CC BY-SA 3.0
2017-10-22T09:48:12.447Z
Do you have any formal ressource to share ?
Mourad Qqch
CC BY-SA 3.0
2017-10-22T09:54:26.350Z
@MouradQqch I would suggest the book Mastering Bitcoin perhaps, especially if you have a bit of programming experience :)
meshcollider
<transactions><doublespend><nodes><attack>
Can one node receive two transactions from the same user (doublespend)?
Mourad Qqch
# Can one node receive two transactions from the same user (doublespend)?

(Asked by: username_0 on 2017-10-22)

I'm learning how the blockchain works. I've read that when someone (say Alice) send twice a transaction to two different peoples (Bob and Charlie) such that Alice has only enough to pay Bob or Charlie, not both, then the first validated block containing of the two transactions will be accepted and the other will be rejected.

My question is : What happens if the two transactions Alice -> Bob AND Alice -> Charlie are sent to the same node and that node validates its block ? Is it possible ? If not, why ?

**Tags:** transactions, doublespend, nodes, attack

> **Comments:**
> **username_1**: You should learn more about how bitcoin works. Your question does not have any sense.  
> **username_0**: Well, I received an answer with sense. I'm learning but it's not that easy when english is my only source of information and not a languague I master.  
> **username_0**: Do you have any formal ressource to share ?  
> **username_2**: @MouradQqch I would suggest the book Mastering Bitcoin perhaps, especially if you have a bit of programming experience :)  

---

## 1 answers

### Answer by username_2 on 2017-10-22. Score: 0 | Accepted answer

No that would not be valid, the node would reject the second transaction it saw, because it would know the UTXO was already spent by the first one. If a miner tries to include both in a block, that block would be invalid too for the same reason.

The exception is if the first transaction signalled to opt in to Replace-by-fee and the second transaction had a high enough fee to replace the first one. ([BIP 125](https://github.com/bitcoin/bips/blob/master/bip-0125.mediawiki))


---

