How to find if two transactions in mempool are conflicting? There are lots of transactions over the mempool of the bitoin. However, there might be double spends. How can we verify whether two transactions are conflicting, i.e. they are double spends of a bitcoin?
P.S. Given two transactions are conflicting, then they both have at least one common input transactions. So, what else should be checked to verify that two transactions are conflicting (double spend).
Thanks
Firstly, there is no &quot;the mempool&quot;. There is no global mempool. Rather each node maintains its own mempool and accepts and rejects transaction to that mempool using their own internal policies. Most nodes have the same policies, but due to different start times, relay delays, and other factors, not every node has the same mempool, although they may be very similar.
When it comes to doublespends, the typical node policy is that if a transaction conflicts with another transaction, it will not be accepted by that node, thus the conflicting transaction doesn't enter that node's mempool. So unless you modify your node to accept conflicts, your node's mempool will never contain conflicting transactions.