mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +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:
parent
a498d699e3
commit
02a0899527
3 changed files with 7 additions and 2 deletions
|
|
@ -31,6 +31,8 @@ std::optional<bilingual_str> ApplyArgsManOptions(const ArgsManager& args, BlockM
|
|||
}
|
||||
opts.prune_target = nPruneTarget;
|
||||
|
||||
if (auto value{args.GetBoolArg("-fastprune")}) opts.fast_prune = *value;
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
} // namespace node
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue