5 #ifndef BITCOIN_NODE_CHAINSTATE_H
6 #define BITCOIN_NODE_CHAINSTATE_H
61 std::optional<ChainstateLoadingError>
64 bool fReindexChainState, int64_t nBlockTreeDBCache,
65 int64_t nCoinDBCache, int64_t nCoinCacheUsage,
66 bool block_tree_db_in_memory,
bool coins_db_in_memory,
67 std::function<
bool()> shutdown_requested =
nullptr,
68 std::function<
void()> coins_error_cb =
nullptr);
76 std::optional<ChainstateLoadVerifyError>
78 bool fReindexChainState,
const Config &config,
79 unsigned int check_blocks,
unsigned int check_level,
80 std::function<int64_t()> get_unix_time_seconds);
const CChainParams & Params()
Return the currently selected parameters.
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Provides an interface for creating and interacting with one or two chainstates: an IBD chainstate gen...
bool fPruneMode
Pruning-related variables and constants.
ChainstateLoadVerifyError
@ ERROR_BLOCK_FROM_FUTURE
@ ERROR_CORRUPTED_BLOCK_DB
std::optional< ChainstateLoadVerifyError > VerifyLoadedChainstate(ChainstateManager &chainman, bool fReset, bool fReindexChainState, const Config &config, unsigned int check_blocks, unsigned int check_level, std::function< int64_t()> get_unix_time_seconds)
std::optional< ChainstateLoadingError > LoadChainstate(bool fReset, ChainstateManager &chainman, CTxMemPool *mempool, bool fPruneMode_, const Consensus::Params &consensus_params, bool fReindexChainState, int64_t nBlockTreeDBCache, int64_t nCoinDBCache, int64_t nCoinCacheUsage, bool block_tree_db_in_memory, bool coins_db_in_memory, std::function< bool()> shutdown_requested, std::function< void()> coins_error_cb)
This sequence can have 4 types of outcomes:
@ ERROR_GENERIC_BLOCKDB_OPEN_FAILED
@ ERROR_CHAINSTATE_UPGRADE_FAILED
@ ERROR_UPGRADING_BLOCK_DB
@ ERROR_REPLAYBLOCKS_FAILED
@ ERROR_BAD_GENESIS_BLOCK
@ ERROR_PRUNED_NEEDS_REINDEX
@ ERROR_LOADCHAINTIP_FAILED
@ ERROR_LOAD_GENESIS_BLOCK_FAILED
Parameters that influence chain consensus.