HomePhabricator

refactor, BlockManager: Replace fastprune from arg with options

Description

refactor, BlockManager: Replace fastprune from arg with options

Summary:
Remove access to the global gArgs for the fastprune argument and
replace it by adding a field to the existing BlockManager Options
struct.

When running clang-tidy-diff on this commit, there is a diagnostic
error: `unknown type name 'uint64_t' [clang-diagnostic-error] uint64_t
prune_target{0};`, which is fixed by including cstdint.

This should eventually allow users of the BlockManager to not rely on
the global gArgs and instead pass in their own options.

This is a partial backport of core#27125
https://github.com/bitcoin/bitcoin/pull/27125/commits/a498d699e3fdac5bfdb33020a1fd6c4a79989752
https://github.com/bitcoin/bitcoin/pull/27125/commits/18e5ba7c8002bcd473ee29ce4b5bfc56df6142a4
Depends on D16184

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
PiRKAuthored on May 17 2024, 13:47
PiRKPushed on May 21 2024, 15:00
Reviewer
Restricted Project
Differential Revision
D16185: refactor, BlockManager: Replace fastprune from arg with options
Parents
rABC99f7dd2d8b85: refactor: Move functions to BlockManager methods
Branches
Unknown
Tags
Unknown