Skip to content

Commit 55d525a

Browse files
committed
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.
1 parent 4ed55df commit 55d525a

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ CScript COINBASE_FLAGS;
129129

130130
// Internal stuff
131131
namespace {
132-
CBlockIndex *&pindexBestInvalid = ::ChainstateActive().pindexBestInvalid;
132+
CBlockIndex* pindexBestInvalid = nullptr;
133133

134134
CCriticalSection cs_LastBlockFile;
135135
std::vector<CBlockFileInfo> vinfoBlockFile;

src/validation.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,6 @@ class CChainState {
561561
//! The current chain of blockheaders we consult and build on.
562562
//! @see CChain, CBlockIndex.
563563
CChain m_chain;
564-
CBlockIndex *pindexBestInvalid = nullptr;
565564
/**
566565
* The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS (for itself and all ancestors) and
567566
* as good as our current tip or better. Entries may be failed, though, and pruning nodes may be

0 commit comments

Comments
 (0)