Examine soundness of mempool behavior of dropping earliest tx when block is disconnected
In !1072 (merged), we hit upon the behavior of the earliest tx being dropped from mempool when a block was disconnected due to re-org.
(happens or is supposed to happen only when mempool size
DynamicMemoryUsage() > MAX_DISCONNECTED_TX_POOL_SIZE`.
This logic needs some looking at.
It was first added into Bitcoin Core in https://github.com/bitcoin/bitcoin/pull/9208 and backported into ABC via https://github.com/bitcoin/bitcoin/pull/9208 , and lastly touched up into present state in https://reviews.bitcoinabc.org/D1667 .
Edited by freetrader