mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-16 16:32:47 +00:00
validation: remove LoadChainTip call from ActivateSnapshot
This call is a no-op. PopulateAndValidateSnapshot already sets both the chain tip and the coins cache best block to the snapshot block, so LoadChainTip always hits the early return when it finds that the two match (tip->GetBlockHash() == coins_cache.GetBestBlock()).
This commit is contained in:
parent
4933d1fbba
commit
9249e6089e
@ -5741,8 +5741,6 @@ util::Result<CBlockIndex*> ChainstateManager::ActivateSnapshot(
|
||||
}
|
||||
|
||||
Chainstate& chainstate{AddChainstate(std::move(snapshot_chainstate))};
|
||||
const bool chaintip_loaded{chainstate.LoadChainTip()};
|
||||
assert(chaintip_loaded);
|
||||
m_blockman.m_snapshot_height = Assert(chainstate.SnapshotBase())->nHeight;
|
||||
|
||||
LogInfo("[snapshot] successfully activated snapshot %s", base_blockhash.ToString());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user