|
| void | SetMempool (CTxMemPool *mempool) |
| | Chainstate (CTxMemPool *mempool, node::BlockManager &blockman, ChainstateManager &chainman, std::optional< uint256 > from_snapshot_blockhash=std::nullopt) |
| fs::path | StoragePath () const |
| | Return path to chainstate leveldb directory.
|
| kernel::ChainstateRole GetRole() const EXCLUSIVE_LOCKS_REQUIRED(void | InitCoinsDB (size_t cache_size_bytes, bool in_memory, bool should_wipe) |
| | Initialize the CoinsViews UTXO set database management data structures.
|
| void InitCoinsCache(size_t cache_size_bytes) EXCLUSIVE_LOCKS_REQUIRED(bool | CanFlushToDisk () const EXCLUSIVE_LOCKS_REQUIRED( |
| Assumeutxo m_assumeutxo | GUARDED_BY (::cs_main) |
| std::optional< uint256 > m_target_blockhash | GUARDED_BY (::cs_main) |
| std::optional< AssumeutxoHash > m_target_utxohash | GUARDED_BY (::cs_main) |
| 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.
|
| bool ResizeCoinsCaches(size_t coinstip_size, size_t coinsdb_size) EXCLUSIVE_LOCKS_REQUIRED(bool | FlushStateToDisk (BlockValidationState &state, FlushStateMode mode, int nManualPruneHeight=0) |
| | Update the on-disk chain state.
|
| void | ForceFlushStateToDisk (bool wipe_cache=true) |
| | Flush all changes to disk.
|
| void | PruneAndFlush () |
| bool | DisconnectTip (BlockValidationState &state, DisconnectedBlockTransactions *disconnectpool) EXCLUSIVE_LOCKS_REQUIRED(cs_main |
| | Disconnect m_chain's tip.
|
| bool | ReplayBlocks () |
| | Replay blocks that aren't fully applied to the database.
|
| bool | NeedsRedownload () const EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| | Whether the chain state needs to be redownloaded due to lack of witness data.
|
| bool | LoadGenesisBlock () |
| | Ensures we have a genesis block in the block tree, possibly writing one to disk.
|
| void | TryAddBlockIndexCandidate (CBlockIndex *pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| | Add a block to the candidate set if it has as much work as the current tip.
|
| void | PruneBlockIndexCandidates () |
| | Delete all entries in setBlockIndexCandidates that are worse than the current tip.
|
| void ClearBlockIndexCandidates() EXCLUSIVE_LOCKS_REQUIRED(void PopulateBlockIndexCandidates() EXCLUSIVE_LOCKS_REQUIRED(const CBlockIndex * | FindForkInGlobalIndex (const CBlockLocator &locator) const EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| | Populate the candidate set by calling TryAddBlockIndexCandidate on all valid block indices.
|
| bool | LoadChainTip () EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| | Update the chain tip based on database information, i.e.
|
| CoinsCacheSizeState GetCoinsCacheSizeState() EXCLUSIVE_LOCKS_REQUIRED(CoinsCacheSizeState GetCoinsCacheSizeState(size_t max_coins_cache_size_bytes, size_t max_mempool_size_bytes) EXCLUSIVE_LOCKS_REQUIRED(std::string ToString() EXCLUSIVE_LOCKS_REQUIRED(RecursiveMutex * | MempoolMutex () const LOCK_RETURNED(m_mempool -> cs) |
| | Indirection necessary to make lock annotations work with an optional mempool.
|
|
| node::BlockManager & | m_blockman |
| ChainstateManager & | m_chainman |
| CChain | m_chain |
| const std::optional< uint256 > | m_from_snapshot_blockhash |
| | The blockhash which is the base of the snapshot this chainstate was created from.
|
| const CBlockIndex *SnapshotBase() const EXCLUSIVE_LOCKS_REQUIRED(const CBlockIndex *TargetBlock() const EXCLUSIVE_LOCKS_REQUIRED(void SetTargetBlock(CBlockIndex *block) EXCLUSIVE_LOCKS_REQUIRED(void SetTargetBlockHash(uint256 block_hash) EXCLUSIVE_LOCKS_REQUIRED(boo | ReachedTarget )() const EXCLUSIVE_LOCKS_REQUIRED( |
| | The base of the snapshot this chainstate was created from.
|
| std::set< CBlockIndex *, node::CBlockIndexWorkComparator > | setBlockIndexCandidates |
| | The set of all CBlockIndex entries that have as much work as our current tip or more, and transaction data needed to be validated (with BLOCK_VALID_TRANSACTIONS for each block and its parents back to the genesis block or an assumeutxo snapshot block).
|
| size_t | m_coinsdb_cache_size_bytes {0} |
| | The cache size of the on-disk coins view.
|
| size_t | m_coinstip_cache_size_bytes {0} |
| | The cache size of the in-memory coins view.
|
| bool ActivateBestChain(BlockValidationState &state, std::shared_ptr< const CBlock > pblock=nullptr) LOCKS_EXCLUDED(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) |
| | Find the best known block, and make it the tip of the block chain.
|
| bool m_mempool | cs |
| bool PreciousBlock(BlockValidationState &state, CBlockIndex *pindex) LOCKS_EXCLUDED(bool InvalidateBlock(BlockValidationState &state, CBlockIndex *pindex) LOCKS_EXCLUDED(void SetBlockFailureFlags(CBlockIndex *pindex) EXCLUSIVE_LOCKS_REQUIRED(voi | ResetBlockFailureFlags )(CBlockIndex *pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| | Mark a block as precious and reorganize.
|
| const CBlockIndex *m_cached_snapshot_base | GUARDED_BY (::cs_main) |
| | Cached result of LookupBlockIndex(*m_from_snapshot_blockhash).
|
| const CBlockIndex *m_cached_target_block | GUARDED_BY (::cs_main) |
| | Cached result of LookupBlockIndex(*m_target_blockhash).
|
| std::optional< const char * > m_last_script_check_reason_logged | GUARDED_BY (::cs_main) |
| bool | ActivateBestChainStep (BlockValidationState &state, CBlockIndex *pindexMostWork, const std::shared_ptr< const CBlock > &pblock, bool &fInvalidFound, ConnectTrace &connectTrace) EXCLUSIVE_LOCKS_REQUIRED(cs_main |
| | Try to make some progress towards making pindexMostWork the active block.
|
| bool | ConnectTip (BlockValidationState &state, CBlockIndex *pindexNew, std::shared_ptr< const CBlock > block_to_connect, ConnectTrace &connectTrace, DisconnectedBlockTransactions &disconnectpool) EXCLUSIVE_LOCKS_REQUIRED(cs_main |
| | Connect a new block to m_chain.
|
| void | InvalidBlockFound (CBlockIndex *pindex, const BlockValidationState &state) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| CBlockIndex * | FindMostWorkChain () EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| | Return the tip of the chain with the most work in it, that isn't known to be invalid (it's however far from certain to be valid).
|
| bool | RollforwardBlock (const CBlockIndex *pindex, CCoinsViewCache &inputs) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| | Apply the effects of a block on the utxo cache, ignoring that it may already have been applied.
|
| void | CheckForkWarningConditions () EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| void | InvalidChainFound (CBlockIndex *pindexNew) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| void | MaybeUpdateMempoolForReorg (DisconnectedBlockTransactions &disconnectpool, bool fAddToMempool) EXCLUSIVE_LOCKS_REQUIRED(cs_main |
| | Make mempool consistent after a reorg, by re-adding or recursively erasing disconnected block transactions from the mempool, and also removing any other transactions from the mempool that are no longer valid given the new tip/height.
|
| Mutex | m_chainstate_mutex |
| | The ChainState Mutex A lock that must be held when modifying this ChainState - held in ActivateBestChain() and InvalidateBlock().
|
| CTxMemPool * | m_mempool |
| std::unique_ptr< CoinsViews > | m_coins_views |
| | Manages the UTXO set, which is a reflection of the contents of m_chain.
|
| void m_mempool | cs |
| void UpdateTip(const CBlockIndex *pindexNew) EXCLUSIVE_LOCKS_REQUIRED(NodeClock::time_poin | m_next_write ) {NodeClock::time_point::max()} |
| | Check warning conditions and do some notifications on new chain tip set.
|
| util::Result< void > InvalidateCoinsDBOnDisk() EXCLUSIVE_LOCKS_REQUIRED(friend | ChainstateManager |
| | In case of an invalid snapshot, rename the coins leveldb directory so that it can be examined for issue diagnosis.
|
Definition at line 15 of file mempool.h.