<p>In your example, only one of the blocks will become part of the longest valid chain, and the transaction included in that block will become a part of the blockchain history. The other block would be discarded, this is what is often called an 'orphan block'. </p>

<p>Wallet software will show you an 'account balance', but understand this is not how the book keeping works at the protocol level. The blockchain keeps track of 'unspent outputs', which are bitcoin addresses with some as-of-yet unspent balance stored in them. A <em>double spend</em> is an attempt to spend a certain unspent output more than once, but ultimately the network will only accept <em>one</em> of those two (or more) transactions into the blockchain. </p>

<p>Once one of the transactions is included in the blockchain, those bitcoins now reside at a new address, and the other transaction (and any block it is included in) is dropped from the network. There is no 'double debit' from an account, so to speak. Bitcoins exist at one address, and then once a valid transaction is confirmed in the blockchain, those bitcoins exist at a new address.  </p>

<p>I suppose some wallet software could be written to debit all unconfirmed transactions from a wallet's balance (thus allowing a 'double debit, as in your example), but this would be a naïve implementation that is not representative of what is actually happening at the protocol level. </p>

CC BY-SA 3.0
2018-01-30T03:10:54.063Z
The OP is asking about what happens before one of the blocks is orphaned. I.e. they are both on separate chains of equal length.
Adam Millerchip
CC BY-SA 3.0
2018-01-30T05:19:00.780Z
@AdamMillerchip At that point, each node on the network will have chosen one chain or the other, and will update their UTXO appropriately (to include Ta or Tb, depending on which block they've accepted). Until the network converges back to a single chain, txs spending either Ta's/Tb's output will be accepted by the portion of the network that sees each of those txs as confirmed. Any one node will not accept more than one chain as valid at the same time. If they accept the 'wrong' one, and the other is extended first by miners, then their client will simply update to the new longest valid chain
chytrik
CC BY-SA 3.0
2018-01-30T05:22:18.753Z
Before the orphaning, from OPs perspective, the wallet OP is using will end up on either one half of the network, or the other. Their wallet should simply show a single debit from their balance, and the corresponding tx (either Ta or Tb).
chytrik
CC BY-SA 3.0
2018-01-30T02:34:04.537Z
2018-01-30T02:34:04.537Z
chytrik
<p>For eg. if Ta and Tb are a double spend of the same transaction with different outputs. These two transactions can flow through different path in the network, and assume flow in exactly opposite path. So Ta reaches miner Ma who creates a block and Tb reaches another miner Mb. Now, Ma may solve the block with Ta and Mb with Tb. Both start broadcasting the respective blocks with Ta and Tb to be a part of block chain (fork created here).</p>

<p>After fork is created and before it is resolved, what is actual balance appearing on the account? Is it double down and gets credited later on?</p>

<doublespend>
In case of a double spend (after double spend and prior getting resolved) what is actual account balance?
Chirag Patel
# In case of a double spend (after double spend and prior getting resolved) what is actual account balance?

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

For eg. if Ta and Tb are a double spend of the same transaction with different outputs. These two transactions can flow through different path in the network, and assume flow in exactly opposite path. So Ta reaches miner Ma who creates a block and Tb reaches another miner Mb. Now, Ma may solve the block with Ta and Mb with Tb. Both start broadcasting the respective blocks with Ta and Tb to be a part of block chain (fork created here).

After fork is created and before it is resolved, what is actual balance appearing on the account? Is it double down and gets credited later on?

**Tags:** doublespend


---

## 1 answers

### Answer by username_1 on 2018-01-30. Score: 1

In your example, only one of the blocks will become part of the longest valid chain, and the transaction included in that block will become a part of the blockchain history. The other block would be discarded, this is what is often called an 'orphan block'.

Wallet software will show you an 'account balance', but understand this is not how the book keeping works at the protocol level. The blockchain keeps track of 'unspent outputs', which are bitcoin addresses with some as-of-yet unspent balance stored in them. A *double spend* is an attempt to spend a certain unspent output more than once, but ultimately the network will only accept *one* of those two (or more) transactions into the blockchain.

Once one of the transactions is included in the blockchain, those bitcoins now reside at a new address, and the other transaction (and any block it is included in) is dropped from the network. There is no 'double debit' from an account, so to speak. Bitcoins exist at one address, and then once a valid transaction is confirmed in the blockchain, those bitcoins exist at a new address.

I suppose some wallet software could be written to debit all unconfirmed transactions from a wallet's balance (thus allowing a 'double debit, as in your example), but this would be a naïve implementation that is not representative of what is actually happening at the protocol level.

> **Comments:**
> **username_2**: The OP is asking about what happens before one of the blocks is orphaned. I.e. they are both on separate chains of equal length.  
> **username_1**: @username_2 At that point, each node on the network will have chosen one chain or the other, and will update their UTXO appropriately (to include Ta or Tb, depending on which block they've accepted). Until the network converges back to a single chain, txs spending either Ta's/Tb's output will be accepted by the portion of the network that sees each of those txs as confirmed. Any one node will not accept more than one chain as valid at the same time. If they accept the 'wrong' one, and the other is extended first by miners, then their client will simply update to the new longest valid chain  
> **username_1**: Before the orphaning, from OPs perspective, the wallet OP is using will end up on either one half of the network, or the other. Their wallet should simply show a single debit from their balance, and the corresponding tx (either Ta or Tb).  

---

