<p>You just have to wait. Eventually, another miner will produce a block and it will be on top of one or the other of the two blocks found at about the same time. The probability of again having two miners find blocks at about the same time is very low. The truly paranoid can wait for six blocks to be mined before relying on a transaction.</p>

<p>Persistent splits should be unlikely because the longer the chain you mine on top of, the higher the probability of you getting to keep the mining reward. If you mine on top of a chain that is one block shorter, you only tie the existing chain that other people are already mining on top of.</p>

CC BY-SA 3.0
2018-01-29T19:33:19.717Z
2018-01-29T19:33:19.717Z
David Schwartz
<p>My understanding of the double spending problem is as follows:</p>

<p>Suppose account A has 1 Bitcoin and sends it to account B and  then creates another transaction which sends the same Bitcoin to account C. Some nodes may be notified about the first transaction first while other nodes may be notified of the second transaction first, leading to a conflict regarding which transaction actually occurred first and is the legitimate one.</p>

<p>If I understand correctly, mining solves this problem by forcing each miner to choose between one of the two transactions. But what happens if two miners receive two distinct transactions (A -> B  vs. A -> C) and produce a hash at exactly the same time  - won't each one still record a different sequence of events?</p>

<p>On a similar note, what happens if miners disagree about who produced the hash first? What happens if two nodes produce a hash at exactly the same moment? Some nodes will say miner x mined earlier others will disagree so how is this issue resolved? How does it end up that all nodes eventually agree unanimously and we don't constantly end up with different versions of the block chain? </p>

<client><bitcoin-core-development><doublespend>
Mining & The Double Spending Dilemma
David Lynch
# Mining & The Double Spending Dilemma

(Asked by: username_0 on 2018-01-29)

My understanding of the double spending problem is as follows:

Suppose account A has 1 Bitcoin and sends it to account B and then creates another transaction which sends the same Bitcoin to account C. Some nodes may be notified about the first transaction first while other nodes may be notified of the second transaction first, leading to a conflict regarding which transaction actually occurred first and is the legitimate one.

If I understand correctly, mining solves this problem by forcing each miner to choose between one of the two transactions. But what happens if two miners receive two distinct transactions (A -> B vs. A -> C) and produce a hash at exactly the same time - won't each one still record a different sequence of events?

On a similar note, what happens if miners disagree about who produced the hash first? What happens if two nodes produce a hash at exactly the same moment? Some nodes will say miner x mined earlier others will disagree so how is this issue resolved? How does it end up that all nodes eventually agree unanimously and we don't constantly end up with different versions of the block chain?

**Tags:** client, bitcoin-core-development, doublespend


---

## 1 answers

### Answer by username_1 on 2018-01-29. Score: 0 | Accepted answer

You just have to wait. Eventually, another miner will produce a block and it will be on top of one or the other of the two blocks found at about the same time. The probability of again having two miners find blocks at about the same time is very low. The truly paranoid can wait for six blocks to be mined before relying on a transaction.

Persistent splits should be unlikely because the longer the chain you mine on top of, the higher the probability of you getting to keep the mining reward. If you mine on top of a chain that is one block shorter, you only tie the existing chain that other people are already mining on top of.


---

