The mempool_conflicts variable is added to CWalletTx, it is a set of txids of txs in the mempool conflicting with the wallet tx or a wallet tx’s parent. This PR only changes how mempool-conflicted txs are dealt with in memory.
IsSpent now returns false for an output being spent by a mempool conflicted transaction where it previously returned true.
A txid is added to mempool_conflicts during transactionAddedToMempool. A txid is removed from mempool_conflicts during transactionRemovedFromMempool.
This PR also adds a mempoolconflicts field to the gettransaction wallet RPC result.