If a transaction is already mined in lets say block A and has 2 confirmations, how can this transaction be spent again?

My understanding is that for a transaction to be propagated to the network it must be verified by each node, one of the checks is to see if the referenced UTXOs have been spent.

In order to double spend the inputs referenced in this transaction included in block A each node would attempt to verify it but would reject the transaction since the inputs have already been spent and so the double spend attempt would fail regardless of if you have control of 51% of hashing power.

So how is it that these double spends are possible by remining block A in this case?

1 Answer 1


Bitcoin nodes have to be able to perform a blockchain reorganisation. This is because in a large network, two distant miners can mine a new block at the same time, each of which reaches their nearby nodes before the other miner's block. A subsequent blockchain reorganisation is necessary to make all nodes in the whole network have the same blocks in their copy of the blockchain. This replaces one of the two mined blocks. Generally this can happen after several blocks have been mined over each of the two different blocks at the same block-height. Nodes learning of the alternate head of blockchain choose the one with the most work (proof of work). During the reorganisation they make the appropriate deletions and additions to their UTXO set.

The attack called a "51% attack" is a way in which this necessary blockchain reorganisation process can be exploited by a miner with more than 50% of the total network hashing power (not of number of nodes as people sometimes mistakenly think)

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.