bitcoin/bitcoin — pull request #4514 by sipa (2014-07-12 15:23:31+00:00)
Title: Do not overwrite mempool transactions with equivalent double-spends

#4450 introduced a check for non-equivalent double spends and relaying, but for *equivalent* double spends it changed existing behaviour by still calling mempool.addUnchecked() on them. This breaks mempool consistency (detected using -checkmempool after a few days of running), which could be exploited to crash miner's nodes.