From 55d525ab9004631d30dcc60a1ec5d9cd6c6afe56 Mon Sep 17 00:00:00 2001 From: James O'Beirne Date: Mon, 24 Jun 2019 13:57:01 -0400 Subject: [PATCH] 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. --- src/validation.cpp | 2 +- src/validation.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 3e71928d172..0a84a0eec2f 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -129,7 +129,7 @@ CScript COINBASE_FLAGS; // Internal stuff namespace { - CBlockIndex *&pindexBestInvalid = ::ChainstateActive().pindexBestInvalid; + CBlockIndex* pindexBestInvalid = nullptr; CCriticalSection cs_LastBlockFile; std::vector vinfoBlockFile; diff --git a/src/validation.h b/src/validation.h index ab18f662a40..4e971901b8b 100644 --- a/src/validation.h +++ b/src/validation.h @@ -561,7 +561,6 @@ public: //! The current chain of blockheaders we consult and build on. //! @see CChain, CBlockIndex. CChain m_chain; - CBlockIndex *pindexBestInvalid = nullptr; /** * 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