HomePhabricator

miner: Misc small refactor and renaming

Description

miner: Misc small refactor and renaming

Summary:
miner: Remove mentions of 'package' in names

We no longer have the concept of packages in the block generation code.
This commit renames the following:
- `TestPackage` to `TestTx`, plus rename its args
- `addPackageFrac` to `addTxsFrac`
- `addPackageTxs` to `addTxs`

Also updated comments.

Note that TestTx has been renamed to TestTxFits. We already have a poorly named CheckTx method here, no need for another layer of confusion.

miner: Add fPrintPriority member variable

There is no reason to keep checking this arg each time we add a tx. Best
to cache it once at class construction. This saves cycles.

Port of bchn#1118.

Depends on D13121.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK, sdulfari

Reviewed By: #bitcoin_abc, PiRK, sdulfari

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

Details

Provenance
CCulianuAuthored on Mar 15 2021, 11:12
FabienCommitted on Feb 15 2023, 18:41
FabienPushed on Feb 15 2023, 18:41
Reviewer
Restricted Project
Differential Revision
D13122: miner: Misc small refactor and renaming
Parents
rABC874473cdf5fb: mempool: Evict transactions by modified feerate
Branches
Unknown
Tags
Unknown