5

Does the node drop both transactions? Does the node choose which one to keep? What exactly happens? Will both transactions be rejected by the network or will one of them be eventually accepted?

6

When a node hears about a new transaction, they try to accept it to their in-memory pool of transactions. If a node hears about a transaction that conflicts with one of the transactions that is already in their mem-pool, then they simply won't accept it to their mem-pool. The default client also won't forward the transaction on to any other nodes, either.

The node drops the two transactions? The node choose one to keep?

So, essentially, if a node sees a double spend (two transactions trying to spend the same output) they keep the transaction that they saw first.

Both transactions will be rejected by the network or one of them will be eventually accepted?

Assuming they pay the standard fee to get confirmed, a miner would likely include whichever transaction they saw first. So, if more miners see one transaction, it is more likely that one will get confirmed. It's possible miners will solve two blocks at the same time, with conflicting spends of a previous output. In the long run, though, only one spend of an output will stay in the main chain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.