diff options
author | TheCharlatan <seb.kung@gmail.com> | 2024-05-17 18:35:45 +0200 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2024-06-07 13:06:57 +0200 |
commit | e17255322378076edce3ef6f06cd36ca58d2e236 (patch) | |
tree | 814d7178a150ffbec425f3fddfc73783d80d7b7b /src | |
parent | 533eab7d67d78f217f74909662133086b79ea808 (diff) |
validation: Remove needs_init from LoadBlockIndex
It does not control any actual logic and the log message as well as the
comment are obsolete, since no database initialization takes place there
anymore. Log messages indicating when indexes and chainstate databases
are loaded exist in other places.
Diffstat (limited to 'src')
-rw-r--r-- | src/validation.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index d398ec7406..3109045521 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4790,7 +4790,6 @@ bool ChainstateManager::LoadBlockIndex() { AssertLockHeld(cs_main); // Load block index from databases - bool needs_init = m_blockman.m_reindexing; if (!m_blockman.m_reindexing) { bool ret{m_blockman.LoadBlockIndexDB(SnapshotBlockhash())}; if (!ret) return false; @@ -4822,18 +4821,6 @@ bool ChainstateManager::LoadBlockIndex() if (pindex->IsValid(BLOCK_VALID_TREE) && (m_best_header == nullptr || CBlockIndexWorkComparator()(m_best_header, pindex))) m_best_header = pindex; } - - needs_init = m_blockman.m_block_index.empty(); - } - - if (needs_init) { - // Everything here is for *new* reindex/DBs. Thus, though - // LoadBlockIndexDB may have set m_reindexing if we shut down - // mid-reindex previously, we don't check m_reindexing and - // instead only check it prior to LoadBlockIndexDB to set - // needs_init. - - LogPrintf("Initializing databases...\n"); } return true; } |