mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
refactor: Add stop_at_height option in ChainstateManager
Remove access to the global gArgs for the stopatheight argument and replace it by adding a field to the existing ChainstateManager Options struct. This should eventually allow users of the ChainstateManager to not rely on the global gArgs and instead pass in their own options.
This commit is contained in:
parent
214f8f18b3
commit
ef95be334f
4 changed files with 6 additions and 4 deletions
|
|
@ -37,6 +37,8 @@ util::Result<void> ApplyArgsManOptions(const ArgsManager& args, ChainstateManage
|
|||
|
||||
if (auto value{args.GetIntArg("-maxtipage")}) opts.max_tip_age = std::chrono::seconds{*value};
|
||||
|
||||
if (auto value{args.GetIntArg("-stopatheight")}) opts.stop_at_height = *value;
|
||||
|
||||
ReadDatabaseArgs(args, opts.block_tree_db);
|
||||
ReadDatabaseArgs(args, opts.coins_db);
|
||||
ReadCoinsViewArgs(args, opts.coins_view);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue