Page MenuHomePhabricator

Merge #12118: Sort mempool by min(feerate, ancestor_feerate)
ClosedPublic

Authored by nakihito on Jul 22 2019, 23:24.

Details

Summary

0a22a52 Use mempool's ancestor sort in transaction selection (Suhas Daftuar)
7abfa53 Add test for new ancestor feerate sort behavior (Suhas Daftuar)
9a51319 Sort mempool by min(feerate, ancestor_feerate) (Suhas Daftuar)
6773f92 Refactor CompareTxMemPoolEntryByDescendantScore (Suhas Daftuar)

Pull request description:

This more closely approximates the desirability of a given transaction for
mining, and should result in less re-sorting when transactions get removed from
the mempool after being mined.

I measured this as approximately a 5% speedup in removeForBlock.

Tree-SHA512: ffa36b567c5dfe3e8908c545a459b6a5ec0de26e7dc81b1050dd235cac9046564b4409a3f8c5ba97bd8b30526e8fec8f78480a912e317979467f32305c3dd37b

Backport of Core PR12118
https://github.com/bitcoin/bitcoin/pull/12118/

Test Plan
make check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

nakihito created this revision.Jul 22 2019, 23:24
Owners added a reviewer: Restricted Owners Package.Jul 22 2019, 23:24
Herald added a reviewer: Restricted Project. · View Herald TranscriptJul 22 2019, 23:24
nakihito planned changes to this revision.Jul 22 2019, 23:24
nakihito requested review of this revision.Jul 31 2019, 18:45
nakihito added inline comments.
src/test/mempool_tests.cpp
597 ↗(On Diff #10391)
deadalnix accepted this revision.Aug 4 2019, 08:01
This revision is now accepted and ready to land.Aug 4 2019, 08:01