Let's say Alice sends 5 BTC to Bob and Alice tries to make double spending by again sending those same 5 BTC inputs to carl and lets say that Alice is also a one of the miner node.
- Here Alice tries to take those 2 double spent transactions into a same single block
- lets say Alice solved hash puzzle and broadcasted those 2 transactions in the same block
since in first transaction, inputs UTXO and output UTXO are valid and in second transaction which is of same block, even have input UTXO which is unspent, but it is double spent. when block is broadcasted those 2 transactions are broadcasted simultaneously,
- how other nodes are going to validate those 2 simultaneously broadcasted transaction technically by bitcoin code(Where those 2 transaction in same block)?
- How is this double spending is solved technically by bitcoin code, when 2 transactions are included in same block (When block is broadcasted then those 2 transactions are broadcasted simultaneously )?