Part of v3 and package relay (see #27463).
Problem When loading mempool.dat, we apply -minrelaytxfee and mempool min feerate on each transaction, meaning we’ll reject transactions that may be CPFP’d by later transactions mempool.dat. Even without package relay, we can run into this problem if we are shrinking -maxmempool or raising -minrelaytxfee on a restart.
Solution
When loading mempool.dat, use bypass_limits=true
and then call TrimToSize()
at the very end.
Advantages:
- We definitely keep the “highest descendant score” transactions if mempool min feerate rises.
- It’s extremely simple implementation-wise.
- It’s simple to keep track of what made it in and what didn’t.
Disadvantages:
- If mempool.dat is very large, we can exceed maxmempool by quite a bit.
- This won’t be sufficient for ephemeral anchors (unless
bypass_limits
allows not-yet-spent anchors).