Recently I have been studying on the bitcoin. while going through the double spend process, I found this link as How do I detect a double-spend?
and an answer there describes different scenarios:
Double spending is handled like this -- if two transactions spending the same input(s) happen in the same block, both will be rejected. If one transaction makes it into a block before the other, the first one will be accepted and the second will be rejected. Now, if two transactions entered the network simultaneously, but at different endpoint, by the time the next block is mined it's likely that they would have made it into the same block and thus be simultaneously rejected. It's also possible that a block is mined containing one transaction, and all subsequent blocks containing the other transaction will simply be rejected. The third and least likely scenario is that two blocks are mined simultaneously -- each containing one of the competing transactions -- and this would cause a fork in the blockchain. However, this is the purpose of having confirmations, and by the time you reach 6, it's extremely likely that the forks have been reconciled and that one of these transactions will be rejected along with the rejected fork.
however I could not grasp it.
- if two transactions spending the same input(s) happen in the same block, both will be rejected.
Is it possible that two transactions are in same block? To my knowledge, each node will validate the transaction before it is placed in the memory pool. So next time the same transaction appears, doesn't it invalidate the second transaction?
- if two transactions entered the network simultaneously, but at different endpoint, by the time the next block is mined it's likely that they would have made it into the same block and thus be simultaneously rejected.
Isn't it the same case as above???