Page MenuHomePhabricator

Optimize `removeForBlock`
Open, Needs TriagePublic


The following commit was introduced to fix a bug with ancestor and descendant handling when removing transactions from the mempool after accepting a new block.

The method of to fix this was to resort the block transactions into topological order before removing them. However, this is quite slow, and adds 1.5 hours to IBD.

We should optimize this process as much as possible, or fix the underlying root cause (how the mempool tracks transaction chain stats)