Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | private: | ||||
std::set<CBlockIndex *> m_failed_blocks; | std::set<CBlockIndex *> m_failed_blocks; | ||||
public: | public: | ||||
CChain chainActive; | CChain chainActive; | ||||
BlockMap mapBlockIndex; | BlockMap mapBlockIndex; | ||||
std::multimap<CBlockIndex *, CBlockIndex *> mapBlocksUnlinked; | std::multimap<CBlockIndex *, CBlockIndex *> mapBlocksUnlinked; | ||||
CBlockIndex *pindexBestInvalid = nullptr; | CBlockIndex *pindexBestInvalid = nullptr; | ||||
CBlockIndex *pindexBestParked = nullptr; | CBlockIndex *pindexBestParked = nullptr; | ||||
CBlockIndex const *pindexFinalized = nullptr; | |||||
bool LoadBlockIndex(const Config &config, CBlockTreeDB &blocktree) | bool LoadBlockIndex(const Config &config, CBlockTreeDB &blocktree) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main); | EXCLUSIVE_LOCKS_REQUIRED(cs_main); | ||||
bool ActivateBestChain( | bool ActivateBestChain( | ||||
const Config &config, CValidationState &state, | const Config &config, CValidationState &state, | ||||
std::shared_ptr<const CBlock> pblock = std::shared_ptr<const CBlock>()); | std::shared_ptr<const CBlock> pblock = std::shared_ptr<const CBlock>()); | ||||
▲ Show 20 Lines • Show All 143 Lines • ▼ Show 20 Lines | |||||
namespace { | namespace { | ||||
CBlockIndex *&pindexBestInvalid = g_chainstate.pindexBestInvalid; | CBlockIndex *&pindexBestInvalid = g_chainstate.pindexBestInvalid; | ||||
CBlockIndex *&pindexBestParked = g_chainstate.pindexBestParked; | CBlockIndex *&pindexBestParked = g_chainstate.pindexBestParked; | ||||
/** | /** | ||||
* The best finalized block. | * The best finalized block. | ||||
* This block cannot be reorged in any way, shape or form. | * This block cannot be reorged in any way, shape or form. | ||||
*/ | */ | ||||
CBlockIndex const *pindexFinalized; | CBlockIndex const *&pindexFinalized = g_chainstate.pindexFinalized; | ||||
/** | /** | ||||
* All pairs A->B, where A (or one of its ancestors) misses transactions, but B | * All pairs A->B, where A (or one of its ancestors) misses transactions, but B | ||||
* has transactions. Pruned nodes may have entries where B is missing data. | * has transactions. Pruned nodes may have entries where B is missing data. | ||||
*/ | */ | ||||
std::multimap<CBlockIndex *, CBlockIndex *> &mapBlocksUnlinked = | std::multimap<CBlockIndex *, CBlockIndex *> &mapBlocksUnlinked = | ||||
g_chainstate.mapBlocksUnlinked; | g_chainstate.mapBlocksUnlinked; | ||||
▲ Show 20 Lines • Show All 5,474 Lines • Show Last 20 Lines |