From 0e17c833cda67cdba5338bd7409061772b6d5edb Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Wed, 2 Sep 2020 16:05:54 -0400 Subject: validation: Make CChainState.m_blockman public --- src/validation.cpp | 4 ++-- src/validation.h | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/validation.cpp b/src/validation.cpp index fe08c37b8f..3a9ad5844e 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1264,8 +1264,8 @@ void CoinsViews::InitCache() } CChainState::CChainState(CTxMemPool& mempool, BlockManager& blockman, uint256 from_snapshot_blockhash) - : m_blockman(blockman), - m_mempool(mempool), + : m_mempool(mempool), + m_blockman(blockman), m_from_snapshot_blockhash(from_snapshot_blockhash) {} void CChainState::InitCoinsDB( diff --git a/src/validation.h b/src/validation.h index d39c02f795..ad5cbe019e 100644 --- a/src/validation.h +++ b/src/validation.h @@ -536,11 +536,6 @@ protected: */ mutable std::atomic m_cached_finished_ibd{false}; - //! Reference to a BlockManager instance which itself is shared across all - //! CChainState instances. Keeping a local reference allows us to test more - //! easily as opposed to referencing a global. - BlockManager& m_blockman; - //! mempool that is kept in sync with the chain CTxMemPool& m_mempool; @@ -548,6 +543,10 @@ protected: std::unique_ptr m_coins_views; public: + //! Reference to a BlockManager instance which itself is shared across all + //! CChainState instances. + BlockManager& m_blockman; + explicit CChainState(CTxMemPool& mempool, BlockManager& blockman, uint256 from_snapshot_blockhash = uint256()); /** -- cgit v1.2.3