Move pindexBestInvalid to ChainstateManager

A private member is better than a global.
This commit is contained in:
MarcoFalke
2021-11-23 19:49:48 +01:00
parent facd2137ec
commit fab6d6b2d1
2 changed files with 16 additions and 15 deletions

View File

@@ -866,6 +866,9 @@ private:
//! by the background validation chainstate.
bool m_snapshot_validated{false};
CBlockIndex* m_best_invalid;
friend bool BlockManager::LoadBlockIndex(const Consensus::Params&, ChainstateManager&);
//! Internal helper for ActivateSnapshot().
[[nodiscard]] bool PopulateAndValidateSnapshot(
CChainState& snapshot_chainstate,