aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@gmail.com>2019-03-27 11:53:31 -0400
committerJames O'Beirne <james.obeirne@gmail.com>2019-05-16 09:06:54 -0400
commit4d6688603b8c8df854d52df464e157d0a6e7bde6 (patch)
tree723066ac26b7bb41bfebdf133d0fd092170c3c5d /src/validation.h
parentd7c97edeea8cee10ad9da1f940d39d5073ac142d (diff)
refactoring: introduce ChainstateActive()
To be used once we move global functions (e.g. FlushStateToDisk()) into CChainState methods. Thanks to Marco Falke for suggestions
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h3
1 files changed, 3 insertions, 0 deletions
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();