mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-31 08:13:52 +02:00
refactor, BlockManager: Replace fastprune from arg with options
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 commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#ifndef BITCOIN_KERNEL_BLOCKMANAGER_OPTS_H
|
||||
#define BITCOIN_KERNEL_BLOCKMANAGER_OPTS_H
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
class CChainParams;
|
||||
|
||||
namespace kernel {
|
||||
@@ -16,6 +18,7 @@ namespace kernel {
|
||||
struct BlockManagerOpts {
|
||||
const CChainParams& chainparams;
|
||||
uint64_t prune_target{0};
|
||||
bool fast_prune{false};
|
||||
};
|
||||
|
||||
} // namespace kernel
|
||||
|
||||
Reference in New Issue
Block a user