Page MenuHomePhabricator

mempool: Evict transactions by modified feerate
ClosedPublic

Authored by Fabien on Feb 10 2023, 11:43.

Details

Reviewers
PiRK
sdulfari
Group Reviewers
Restricted Project
Commits
rABC874473cdf5fb: mempool: Evict transactions by modified feerate
Summary
When trimming the mempool, remove transactions by lowest (modified) feerate rather than feerate-with-descendants.

Port of bchn#1080.

Depends on D13116 and D13120.

Test Plan
ninja all check-all

Event Timeline

Fabien requested review of this revision.Feb 10 2023, 11:43
This revision is now accepted and ready to land.Feb 14 2023, 09:34
sdulfari requested changes to this revision.Feb 14 2023, 21:40
sdulfari added a subscriber: sdulfari.
sdulfari added inline comments.
src/test/mempool_tests.cpp
681–683

This special case ceil usage gives a bad smell. Could we do away with this change by just picking a more workable fee value?

src/txmempool.cpp
1278–1279

Easier to read

This revision now requires changes to proceed.Feb 14 2023, 21:40
src/txmempool.cpp
1278–1279

That won't work unfortunately, because the cast below expects a forward iterator

1293

here the cast requires a forward iterator, and converting the iterator makes the code less readable overall

Pick a better value for the test to avoid the need for std::ceil

sdulfari added inline comments.
src/test/mempool_tests.cpp
17 ↗(On Diff #37902)

cleanup

This revision is now accepted and ready to land.Feb 15 2023, 17:08
This revision was automatically updated to reflect the committed changes.