Add BlockManagerOpts::chainparams reference

and use it in blockstorage.cpp
This commit is contained in:
MarcoFalke
2023-05-04 12:19:35 +02:00
parent 6c7ebcc14b
commit facdb8b331
8 changed files with 31 additions and 9 deletions

View File

@@ -1036,7 +1036,9 @@ bool AppInitParameterInteraction(const ArgsManager& args, bool use_syscall_sandb
if (const auto error{ApplyArgsManOptions(args, chainman_opts_dummy)}) {
return InitError(*error);
}
node::BlockManager::Options blockman_opts_dummy{};
node::BlockManager::Options blockman_opts_dummy{
.chainparams = chainman_opts_dummy.chainparams,
};
if (const auto error{ApplyArgsManOptions(args, blockman_opts_dummy)}) {
return InitError(*error);
}
@@ -1439,7 +1441,9 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
};
Assert(!ApplyArgsManOptions(args, chainman_opts)); // no error can happen, already checked in AppInitParameterInteraction
node::BlockManager::Options blockman_opts{};
node::BlockManager::Options blockman_opts{
.chainparams = chainman_opts.chainparams,
};
Assert(!ApplyArgsManOptions(args, blockman_opts)); // no error can happen, already checked in AppInitParameterInteraction
// cache size calculations