Page MenuHomePhabricator

mempool: Add new index for sorting txs by fee
ClosedPublic

Authored by Fabien on Feb 7 2023, 17:16.

Details

Reviewers
sdulfari
Group Reviewers
Restricted Project
Commits
rABCb2540878a039: mempool: Add new index for sorting txs by fee
Summary
This adds a new mempool index that sorts transactions by modified fee
rate, ignoring ancestors.

Port of bchn#1079.

The comparator has been modified so that 2 different txs with the same
modified feerate and time will NOT be considered equal. This makes the
comparator usable for use in sets or maps.

Depends on D13109.

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Feb 7 2023, 17:16
Fabien planned changes to this revision.Feb 8 2023, 18:34

Improve the test:

  • Remove the assert in favor of BOOST_CHECK
  • Simplify into a single lambda for testing ordering
This revision is now accepted and ready to land.Feb 9 2023, 00:13
This revision was automatically updated to reflect the committed changes.