diff options
author | James O'Beirne <james.obeirne@pm.me> | 2022-11-10 12:03:39 -0500 |
---|---|---|
committer | James O'Beirne <james.obeirne@pm.me> | 2023-09-30 06:38:47 -0400 |
commit | c6af23c5179cc383f8e6c275373af8d11e6a989f (patch) | |
tree | fc1e40adedb0c37ad064799580e536515cc47628 /src/validation.h | |
parent | 9f2318c76cc6986d48e13831cf5bd8dab194fdf4 (diff) | |
download | bitcoin-c6af23c5179cc383f8e6c275373af8d11e6a989f.tar.xz |
validation: add ChainstateRole
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/validation.h b/src/validation.h index c2434264d6..38f57ed1b5 100644 --- a/src/validation.h +++ b/src/validation.h @@ -13,6 +13,7 @@ #include <arith_uint256.h> #include <attributes.h> #include <chain.h> +#include <kernel/chain.h> #include <consensus/amount.h> #include <deploymentstatus.h> #include <kernel/chainparams.h> @@ -511,6 +512,12 @@ public: ChainstateManager& chainman, std::optional<uint256> from_snapshot_blockhash = std::nullopt); + //! Return the current role of the chainstate. See `ChainstateManager` + //! documentation for a description of the different types of chainstates. + //! + //! @sa ChainstateRole + ChainstateRole GetRole() const EXCLUSIVE_LOCKS_REQUIRED(::cs_main); + /** * Initialize the CoinsViews UTXO set database management data structures. The in-memory * cache is initialized separately. |