mempool: Evict transactions by lowest modified fee rather than feerate-with-descendants
This changes transaction eviction policy to remove transactions by lowest modified fee, rather than feerate-with-descendants. The descendant_score
index is removed, as its only use was in TrimToSize
. Instead, we can re-use the index added in !1079 (merged).
Pulled out of @jtoomim's cpfp-nuke branch.
Benchmark comparison of TrimToSize before and after, using the EvictChained*
benchmarks which use a filled mempool
Before: (master @ed768039))
EvictChained50Tx, 5, 2, 21.0273, 2.1008, 2.10495, 2.1029
EvictChained50TxRev, 5, 2, 16.1526, 1.6127, 1.61777, 1.61571
After: (!1080 (merged) rebased on master @ed768039)
EvictChained50Tx, 5, 2, 15.5157, 1.54984, 1.55343, 1.5516
EvictChained50TxRev, 5, 2, 14.8455, 1.48256, 1.48721, 1.48475
Test plan
ninja check-bitcoin check-functional
Merge strategy: Do NOT squash.
Edited by freetrader