File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -5251,10 +5251,10 @@ CChainState& ChainstateManager::InitializeChainstate(const uint256& snapshot_blo
5251
5251
return *to_modify;
5252
5252
}
5253
5253
5254
- CChain & ChainstateManager::ActiveChain () const
5254
+ CChainState & ChainstateManager::ActiveChainstate () const
5255
5255
{
5256
5256
assert (m_active_chainstate);
5257
- return m_active_chainstate-> m_chain ;
5257
+ return * m_active_chainstate;
5258
5258
}
5259
5259
5260
5260
bool ChainstateManager::IsSnapshotActive () const
Original file line number Diff line number Diff line change @@ -799,7 +799,8 @@ class ChainstateManager
799
799
std::vector<CChainState*> GetAll ();
800
800
801
801
// ! The most-work chain.
802
- CChain& ActiveChain () const ;
802
+ CChainState& ActiveChainstate () const ;
803
+ CChain& ActiveChain () const { return ActiveChainstate ().m_chain ; }
803
804
int ActiveHeight () const { return ActiveChain ().Height (); }
804
805
CBlockIndex* ActiveTip () const { return ActiveChain ().Tip (); }
805
806
@@ -879,13 +880,13 @@ class ChainstateManager
879
880
/* * DEPRECATED! Please use node.chainman instead. May only be used in validation.cpp internally */
880
881
extern ChainstateManager g_chainman GUARDED_BY (::cs_main);
881
882
882
- /* * @returns the most-work valid chainstate. */
883
+ /* * Please prefer the identical ChainstateManager::ActiveChainstate */
883
884
CChainState& ChainstateActive ();
884
885
885
- /* * @returns the most-work chain. */
886
+ /* * Please prefer the identical ChainstateManager::ActiveChain */
886
887
CChain& ChainActive ();
887
888
888
- /* * @returns the global block index map. */
889
+ /* * Please prefer the identical ChainstateManager::BlockIndex */
889
890
BlockMap& BlockIndex ();
890
891
891
892
/* * Global variable that points to the active block tree (protected by cs_main) */
You can’t perform that action at this time.
0 commit comments