HomePhabricator

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

Description

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

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

Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D3711

Details

Provenance
nakihitoAuthored on Jul 22 2019, 21:33
nakihitoPushed on Aug 5 2019, 20:03
Reviewer
Restricted Owners Package
Differential Revision
D3711: Merge #12118: Sort mempool by min(feerate, ancestor_feerate)
Parents
rABC48c25e9b7b42: Merge #12780: Reduce variable scopes
Branches
Unknown
Tags
Unknown