style-only: Rename *Chainstate return values

This commit is contained in:
Carl Dong
2021-12-23 16:40:03 -05:00
parent 1dd582782d
commit 3401630417
2 changed files with 46 additions and 46 deletions

View File

@@ -182,20 +182,20 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
// instead of unit tests, but for now we need these here.
RegisterAllCoreRPCCommands(tableRPC);
auto rv = LoadChainstate(fReindex.load(),
*Assert(m_node.chainman.get()),
Assert(m_node.mempool.get()),
fPruneMode,
chainparams.GetConsensus(),
m_args.GetBoolArg("-reindex-chainstate", false),
m_cache_sizes.block_tree_db,
m_cache_sizes.coins_db,
m_cache_sizes.coins,
true,
true);
assert(!rv.has_value());
auto maybe_load_error = LoadChainstate(fReindex.load(),
*Assert(m_node.chainman.get()),
Assert(m_node.mempool.get()),
fPruneMode,
chainparams.GetConsensus(),
m_args.GetBoolArg("-reindex-chainstate", false),
m_cache_sizes.block_tree_db,
m_cache_sizes.coins_db,
m_cache_sizes.coins,
true,
true);
assert(!maybe_load_error.has_value());
auto maybe_verify_failure = VerifyLoadedChainstate(
auto maybe_verify_error = VerifyLoadedChainstate(
*Assert(m_node.chainman),
fReindex.load(),
m_args.GetBoolArg("-reindex-chainstate", false),
@@ -203,7 +203,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
m_args.GetIntArg("-checkblocks", DEFAULT_CHECKBLOCKS),
m_args.GetIntArg("-checklevel", DEFAULT_CHECKLEVEL),
static_cast<int64_t(*)()>(GetTime));
assert(!maybe_verify_failure.has_value());
assert(!maybe_verify_error.has_value());
BlockValidationState state;
if (!m_node.chainman->ActiveChainstate().ActivateBestChain(state)) {