Page MenuHomePhabricator

miner: Misc small refactor and renaming
ClosedPublic

Authored by Fabien on Feb 10 2023, 13:57.

Details

Reviewers
PiRK
sdulfari
Group Reviewers
Restricted Project
Commits
rABC53a83b613088: 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

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Feb 10 2023, 13:57
Fabien planned changes to this revision.Feb 10 2023, 14:06
Fabien retitled this revision from miner: Remove mentions of 'package' in names to miner: Misc small refactor and renaming.Feb 10 2023, 14:12
Fabien edited the summary of this revision. (Show Details)
Fabien edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Feb 14 2023, 09:38
This revision was automatically updated to reflect the committed changes.