3
1
So, let's say you have a wallet with 20BTC, and you have a flow like so:
- You send 15BTC to A in block 1
- You send 15BTC to B in block 2
What happens if at block 1 there are two chains across miners. In chain X the transaction is there, in chain Y, the transaction is not there.
When they go to spend the other 15BTC in block 2 and their wallet(imagine a different computer using the same wallet) is on chain Y, then their wallet will let them do it. What happens when:
- Chain X becomes the dominant chain ** Transaction 1 would have confirmed, so would transaction 2 have been rejected and never confirm?
- Chain Y becomes the dominant chain ** Transaction 2 would have confirmed, so would transaction 1 be rejected and never confirm?
How is this represented in the bitcoin software even? I know there are some transactions that can be broadcast but then never confirmed, but how does the wallet know the money is not spend if it's been broadcast?
the transactions in chain Y were never consumed, so they don't need to be "returned" to a "memory pool". Anyone working on chain X would use all broadcasted transactions (including the ones in Y, since they are not recognized as ever having been in a block, since you're working on chain X) – hedgedandlevered – 2014-03-25T22:53:08.890