Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
chainstate.h
Go to the documentation of this file.
1// Copyright (c) 2021 The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_NODE_CHAINSTATE_H
6#define BITCOIN_NODE_CHAINSTATE_H
7
8#include <validation.h>
9
10#include <cstdint>
11#include <functional>
12#include <optional>
13
14struct bilingual_str;
15class Config;
17class CTxMemPool;
18namespace Consensus {
19struct Params;
20} // namespace Consensus
21
22namespace node {
23
24struct CacheSizes;
25
39
54
56using ChainstateLoadResult = std::tuple<ChainstateLoadStatus, bilingual_str>;
57
74 const ChainstateLoadOptions &options);
75
78 const ChainstateLoadOptions &options);
79} // namespace node
80
81#endif // BITCOIN_NODE_CHAINSTATE_H
const CChainParams & Params()
Return the currently selected parameters.
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Definition txmempool.h:212
Provides an interface for creating and interacting with one or two chainstates: an IBD chainstate gen...
Definition init.h:28
ChainstateLoadStatus
Chainstate load status.
Definition chainstate.h:44
@ FAILURE_FATAL
Fatal error which should not prompt to reindex.
@ FAILURE
Generic failure which reindexing may fix.
std::tuple< ChainstateLoadStatus, bilingual_str > ChainstateLoadResult
Chainstate load status code and optional error string.
Definition chainstate.h:56
ChainstateLoadResult LoadChainstate(ChainstateManager &chainman, const CacheSizes &cache_sizes, const ChainstateLoadOptions &options)
This sequence can have 4 types of outcomes:
ChainstateLoadResult VerifyLoadedChainstate(ChainstateManager &chainman, const ChainstateLoadOptions &options)
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85
Bilingual messages:
Definition translation.h:17
std::function< void()> coins_error_cb
Definition chainstate.h:37
std::function< bool()> check_interrupt
Definition chainstate.h:36
static constexpr int DEFAULT_CHECKLEVEL
Definition validation.h:96
static const signed int DEFAULT_CHECKBLOCKS
Definition validation.h:95