validation: add ChainstateRole

This commit is contained in:
James O'Beirne
2022-11-10 12:03:39 -05:00
parent 9f2318c76c
commit c6af23c517
4 changed files with 48 additions and 0 deletions

View File

@@ -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.