|
void | SetMempool (CTxMemPool *mempool) |
|
| Chainstate (CTxMemPool *mempool, node::BlockManager &blockman, ChainstateManager &chainman, std::optional< uint256 > from_snapshot_blockhash=std::nullopt) |
|
void | InitCoinsDB (size_t cache_size_bytes, bool in_memory, bool should_wipe, fs::path leveldb_name="chainstate") |
| Initialize the CoinsViews UTXO set database management data structures. More...
|
|
bool | reliesOnAssumedValid () |
| Return true if this chainstate relies on blocks that are assumed-valid. More...
|
|
CCoinsViewCache & | CoinsTip () EXCLUSIVE_LOCKS_REQUIRED( |
|
CCoinsViewDB & | CoinsDB () EXCLUSIVE_LOCKS_REQUIRED( |
|
CTxMemPool * | GetMempool () |
|
CCoinsViewErrorCatcher & | CoinsErrorCatcher () EXCLUSIVE_LOCKS_REQUIRED( |
|
void | ResetCoinsViews () |
| Destructs all objects related to accessing the UTXO set. More...
|
|
bool | HasCoinsViews () const |
| Does this chainstate have a UTXO set attached? More...
|
|
bool | FlushStateToDisk (BlockValidationState &state, FlushStateMode mode, int nManualPruneHeight=0) |
| Update the on-disk chain state. More...
|
|
void | ForceFlushStateToDisk () |
| Unconditionally flush all changes to disk. More...
|
|
void | PruneAndFlush () |
| Prune blockfiles from the disk if necessary and then flush chainstate changes if we pruned. More...
|
|
bool | DisconnectTip (BlockValidationState &state, DisconnectedBlockTransactions *disconnectpool) EXCLUSIVE_LOCKS_REQUIRED(cs_main |
| Disconnect m_chain's tip. More...
|
|
bool | ReplayBlocks () |
| Replay blocks that aren't fully applied to the database. More...
|
|
bool | NeedsRedownload () const EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| Whether the chain state needs to be redownloaded due to lack of witness data. More...
|
|
bool | LoadGenesisBlock () |
| Ensures we have a genesis block in the block tree, possibly writing one to disk. More...
|
|
void | PruneBlockIndexCandidates () |
| Delete all entries in setBlockIndexCandidates that are worse than the current tip. More...
|
|
const CBlockIndex * | FindForkInGlobalIndex (const CBlockLocator &locator) const EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| Find the last common block of this chain and a locator. More...
|
|
void | CheckBlockIndex () |
| Make various assertions about the state of the block index. More...
|
|
void | LoadMempool (const fs::path &load_path, fsbridge::FopenFn mockable_fopen_function=fsbridge::fopen) |
| Load the persisted mempool from disk. More...
|
|
bool | LoadChainTip () EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| Update the chain tip based on database information, i.e. More...
|
|
|
node::BlockManager & | m_blockman |
| Reference to a BlockManager instance which itself is shared across all Chainstate instances. More...
|
|
ChainstateManager & | m_chainman |
| The chainstate manager that owns this chainstate. More...
|
|
CChain | m_chain |
| The current chain of blockheaders we consult and build on. More...
|
|
const std::optional< uint256 > | m_from_snapshot_blockhash |
| The blockhash which is the base of the snapshot this chainstate was created from. More...
|
|
std::set< CBlockIndex *, node::CBlockIndexWorkComparator > | setBlockIndexCandidates |
| The set of all CBlockIndex entries with either BLOCK_VALID_TRANSACTIONS (for itself and all ancestors) or BLOCK_ASSUMED_VALID (if using background chainstates) and as good as our current tip or better. More...
|
|
size_t | m_coinsdb_cache_size_bytes {0} |
| The cache size of the on-disk coins view. More...
|
|
size_t | m_coinstip_cache_size_bytes {0} |
| The cache size of the in-memory coins view. More...
|
|
bool ActivateBestChain(BlockValidationState &state, std::shared_ptr< const CBlock > pblock=nullptr) LOCKS_EXCLUDED(bool | AcceptBlock (const std::shared_ptr< const CBlock > &pblock, BlockValidationState &state, CBlockIndex **ppindex, bool fRequested, const FlatFilePos *dbp, bool *fNewBlock, bool min_pow_checked) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| Find the best known block, and make it the tip of the block chain. More...
|
|
DisconnectResult DisconnectBlock(const CBlock &block, const CBlockIndex *pindex, CCoinsViewCache &view) EXCLUSIVE_LOCKS_REQUIRED(boo | ConnectBlock )(const CBlock &block, BlockValidationState &state, CBlockIndex *pindex, CCoinsViewCache &view, bool fJustCheck=false) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| Apply the effects of this block (with given index) on the UTXO set represented by coins. More...
|
|
bool m_mempool | cs |
|
bool PreciousBlock(BlockValidationState &state, CBlockIndex *pindex) LOCKS_EXCLUDED(bool InvalidateBlock(BlockValidationState &state, CBlockIndex *pindex) LOCKS_EXCLUDED(voi | ResetBlockFailureFlags )(CBlockIndex *pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| Mark a block as precious and reorganize. More...
|
|
int32_t nBlockSequenceId | GUARDED_BY (::cs_main) |
| Every received block is assigned a unique and increasing identifier, so we know which one to give priority in case of a fork. More...
|
|
bool m_disabled | GUARDED_BY (::cs_main) |
| This toggle exists for use when doing background validation for UTXO snapshots. More...
|
|
int32_t | nBlockReverseSequenceId = -1 |
| Decreasing counter (used by subsequent preciousblock calls). More...
|
|
arith_uint256 | nLastPreciousChainwork = 0 |
| chainwork for the last block that preciousblock has been applied to. More...
|
|
Mutex | m_chainstate_mutex |
| The ChainState Mutex A lock that must be held when modifying this ChainState - held in ActivateBestChain() and InvalidateBlock() More...
|
|
std::atomic< bool > | m_cached_finished_ibd {false} |
| Whether this chainstate is undergoing initial block download. More...
|
|
CTxMemPool * | m_mempool |
| Optional mempool that is kept in sync with the chain. More...
|
|
std::unique_ptr< CoinsViews > | m_coins_views |
| Manages the UTXO set, which is a reflection of the contents of m_chain . More...
|
|
Definition at line 15 of file mempool.h.