Skip to content

Commit 0e17c83

Browse files
committed
validation: Make CChainState.m_blockman public
1 parent d363d06 commit 0e17c83

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/validation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,8 +1264,8 @@ void CoinsViews::InitCache()
12641264
}
12651265

12661266
CChainState::CChainState(CTxMemPool& mempool, BlockManager& blockman, uint256 from_snapshot_blockhash)
1267-
: m_blockman(blockman),
1268-
m_mempool(mempool),
1267+
: m_mempool(mempool),
1268+
m_blockman(blockman),
12691269
m_from_snapshot_blockhash(from_snapshot_blockhash) {}
12701270

12711271
void CChainState::InitCoinsDB(

src/validation.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -536,18 +536,17 @@ class CChainState
536536
*/
537537
mutable std::atomic<bool> m_cached_finished_ibd{false};
538538

539-
//! Reference to a BlockManager instance which itself is shared across all
540-
//! CChainState instances. Keeping a local reference allows us to test more
541-
//! easily as opposed to referencing a global.
542-
BlockManager& m_blockman;
543-
544539
//! mempool that is kept in sync with the chain
545540
CTxMemPool& m_mempool;
546541

547542
//! Manages the UTXO set, which is a reflection of the contents of `m_chain`.
548543
std::unique_ptr<CoinsViews> m_coins_views;
549544

550545
public:
546+
//! Reference to a BlockManager instance which itself is shared across all
547+
//! CChainState instances.
548+
BlockManager& m_blockman;
549+
551550
explicit CChainState(CTxMemPool& mempool, BlockManager& blockman, uint256 from_snapshot_blockhash = uint256());
552551

553552
/**

0 commit comments

Comments
 (0)