refactoring: introduce ChainstateActive()

To be used once we move global functions (e.g. FlushStateToDisk()) into
CChainState methods.

Thanks to Marco Falke for suggestions
This commit is contained in:
James O'Beirne
2019-03-27 11:53:31 -04:00
parent d7c97edeea
commit 4d6688603b
2 changed files with 26 additions and 21 deletions

View File

@@ -575,6 +575,9 @@ bool InvalidateBlock(CValidationState& state, const CChainParams& chainparams, C
/** Remove invalidity status from a block and its descendants. */
void ResetBlockFailureFlags(CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
/** @returns the most-work valid chainstate. */
CChainState& ChainstateActive();
/** @returns the most-work chain. */
CChain& ChainActive();