3

Let's say, Alice sent a bitcoin to Bob, and then immediately sent the same coin to another address controlled by her. A honest node collected these two transactions into a new block. Would the node be able to detect that this pair of transactions are double spent?

1
  • 2
    A node that collects them into the same block is by definition not honest, as it is a violation of the consensus rules that outlaw double spending. Jan 8, 2017 at 1:25

1 Answer 1

4

When Alice sends the bitcoin, she spends an Unspent Transaction Output (UTXO) created by a previous transaction. To create a doublespend, she has to use the same UTXO as an input for another transaction.

As every full node keeps track of all existing UTXO, it is trivial for all nodes to recognize these transactions as doublespend. A block containing two conflicting transactions would be invalid, and thus would not be accepted by any nodes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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