From 4d6688603b8c8df854d52df464e157d0a6e7bde6 Mon Sep 17 00:00:00 2001 From: James O'Beirne Date: Wed, 27 Mar 2019 11:53:31 -0400 Subject: refactoring: introduce ChainstateActive() To be used once we move global functions (e.g. FlushStateToDisk()) into CChainState methods. Thanks to Marco Falke for suggestions --- src/validation.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/validation.h') diff --git a/src/validation.h b/src/validation.h index 8114d42d37..34217b3454 100644 --- a/src/validation.h +++ b/src/validation.h @@ -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(); -- cgit v1.2.3