File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,8 @@ class CChainState {
220
220
void EraseBlockData (CBlockIndex* index) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
221
221
} g_chainstate;
222
222
223
+ CChain& ChainActive () { return g_chainstate.m_chain ; }
224
+
223
225
/* *
224
226
* Mutex to guard access to validation specific variables, such as reading
225
227
* or changing the chainstate.
Original file line number Diff line number Diff line change @@ -438,6 +438,9 @@ void ResetBlockFailureFlags(CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_mai
438
438
/* * The currently-connected chain of blocks (protected by cs_main). */
439
439
extern CChain& chainActive;
440
440
441
+ /* * @returns the most-work chain. */
442
+ CChain& ChainActive ();
443
+
441
444
/* * Global variable that points to the coins database (protected by cs_main) */
442
445
extern std::unique_ptr<CCoinsViewDB> pcoinsdbview;
443
446
You can’t perform that action at this time.
0 commit comments