mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
Move ::fCheckBlockIndex into ChainstateManager
This changes the flag for the bitcoin-chainstate executable. Previously it was false, now it is the chain's default value (still false for the main chain).
This commit is contained in:
@@ -121,7 +121,6 @@ GlobalMutex g_best_block_mutex;
|
||||
std::condition_variable g_best_block_cv;
|
||||
uint256 g_best_block;
|
||||
bool g_parallel_script_checks{false};
|
||||
bool fCheckBlockIndex = false;
|
||||
|
||||
const CBlockIndex* Chainstate::FindForkInGlobalIndex(const CBlockLocator& locator) const
|
||||
{
|
||||
@@ -4507,7 +4506,7 @@ void Chainstate::LoadExternalBlockFile(
|
||||
|
||||
void Chainstate::CheckBlockIndex()
|
||||
{
|
||||
if (!fCheckBlockIndex) {
|
||||
if (!m_chainman.ShouldCheckBlockIndex()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5248,6 +5247,7 @@ void ChainstateManager::ResetChainstates()
|
||||
*/
|
||||
static ChainstateManager::Options&& Flatten(ChainstateManager::Options&& opts)
|
||||
{
|
||||
if (!opts.check_block_index.has_value()) opts.check_block_index = opts.chainparams.DefaultConsistencyChecks();
|
||||
if (!opts.minimum_chain_work.has_value()) opts.minimum_chain_work = UintToArith256(opts.chainparams.GetConsensus().nMinimumChainWork);
|
||||
if (!opts.assumed_valid_block.has_value()) opts.assumed_valid_block = opts.chainparams.GetConsensus().defaultAssumeValid;
|
||||
Assert(opts.adjusted_time_callback);
|
||||
|
||||
Reference in New Issue
Block a user