refactor, blockstorage: Replace stopafterblockimport arg

Add a stop_after_block_import field to the BlockManager options. Use
this field instead of the global gArgs.

This should allow users of the BlockManager to not rely on the global
Args.
This commit is contained in:
TheCharlatan
2023-02-19 10:20:34 +01:00
parent 18e5ba7c80
commit 5ff63a09a9
5 changed files with 11 additions and 8 deletions

View File

@@ -32,6 +32,7 @@ std::optional<bilingual_str> ApplyArgsManOptions(const ArgsManager& args, BlockM
opts.prune_target = nPruneTarget;
if (auto value{args.GetBoolArg("-fastprune")}) opts.fast_prune = *value;
if (auto value{args.GetBoolArg("-stopafterblockimport")}) opts.stop_after_block_import = *value;
return std::nullopt;
}