refactoring: make pindexBestInvalid internal to validation.cpp

There's no need to have this member live on CChainState since it's only used
in validation.cpp.
This commit is contained in:
James O'Beirne 2019-06-24 13:57:01 -04:00
parent 4ed55dfcd7
commit 55d525ab90
2 changed files with 1 additions and 2 deletions

View file

@ -129,7 +129,7 @@ CScript COINBASE_FLAGS;
// Internal stuff // Internal stuff
namespace { namespace {
CBlockIndex *&pindexBestInvalid = ::ChainstateActive().pindexBestInvalid; CBlockIndex* pindexBestInvalid = nullptr;
CCriticalSection cs_LastBlockFile; CCriticalSection cs_LastBlockFile;
std::vector<CBlockFileInfo> vinfoBlockFile; std::vector<CBlockFileInfo> vinfoBlockFile;

View file

@ -561,7 +561,6 @@ public:
//! The current chain of blockheaders we consult and build on. //! The current chain of blockheaders we consult and build on.
//! @see CChain, CBlockIndex. //! @see CChain, CBlockIndex.
CChain m_chain; CChain m_chain;
CBlockIndex *pindexBestInvalid = nullptr;
/** /**
* The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS (for itself and all ancestors) and * The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS (for itself and all ancestors) and
* as good as our current tip or better. Entries may be failed, though, and pruning nodes may be * as good as our current tip or better. Entries may be failed, though, and pruning nodes may be