|
| void | SetMempool (CTxMemPool *mempool) |
| |
| | Chainstate (CTxMemPool *mempool, node::BlockManager &blockman, ChainstateManager &chainman, std::optional< uint256 > from_snapshot_blockhash=std::nullopt) |
| |
| ChainstateRole GetRole() const EXCLUSIVE_LOCKS_REQUIRED(void | InitCoinsDB (size_t cache_size_bytes, bool in_memory, bool should_wipe, fs::path leveldb_name="chainstate") |
| | Return the current role of the chainstate.
|
| |
| void InitCoinsCache(size_t cache_size_bytes) EXCLUSIVE_LOCKS_REQUIRED(bool | CanFlushToDisk () const EXCLUSIVE_LOCKS_REQUIRED( |
| | Initialize the in-memory coins cache (to be done after the health of the on-disk database is verified).
|
| |
| 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 | HasCoinsViews () const |
| | Does this chainstate have a UTXO set attached?
|
| |
| bool ResizeCoinsCaches(size_t coinstip_size, size_t coinsdb_size) EXCLUSIVE_LOCKS_REQUIRED(bool | FlushStateToDisk (BlockValidationState &state, FlushStateMode mode, int nManualPruneHeight=0) |
| | Resize the CoinsViews caches dynamically and flush state to disk.
|
| |
| void | ForceFlushStateToDisk () |
| | Unconditionally flush all changes to disk.
|
| |
| void | PruneAndFlush () |
| | Prune blockfiles from the disk if necessary and then flush chainstate changes if we pruned.
|
| |
| 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) |
| |
| void | PruneBlockIndexCandidates () |
| | Delete all entries in setBlockIndexCandidates that are worse than the current tip.
|
| |
| void ClearBlockIndexCandidates() EXCLUSIVE_LOCKS_REQUIRED(const CBlockIndex * | FindForkInGlobalIndex (const CBlockLocator &locator) const EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| | Find the last common block of this chain and a locator.
|
| |
| 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) |
| | Dictates whether we need to flush the cache to disk or not.
|
| |
|
| node::BlockManager & | m_blockman |
| | Reference to a BlockManager instance which itself is shared across all Chainstate instances.
|
| |
| ChainstateManager & | m_chainman |
| | The chainstate manager that owns this chainstate.
|
| |
| CChain | m_chain |
| | The current chain of blockheaders we consult and build on.
|
| |
| 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() EXCLUSIVE_LOCKS_REQUIRED(std::set< CBlockIndex *, node::CBlockIndexWorkComparator > | setBlockIndexCandidates |
| | The base of the snapshot this chainstate was created from.
|
| |
| 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(voi | ResetBlockFailureFlags )(CBlockIndex *pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| | Mark a block as precious and reorganize.
|
| |
| bool m_disabled | GUARDED_BY (::cs_main) |
| | This toggle exists for use when doing background validation for UTXO snapshots.
|
| |
| const CBlockIndex *m_cached_snapshot_base | GUARDED_BY (::cs_main) |
| | Cached result of LookupBlockIndex(*m_from_snapshot_blockhash)
|
| |
| 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 |
| | Optional mempool that is kept in sync with the chain.
|
| |
| std::unique_ptr< CoinsViews > | m_coins_views |
| | Manages the UTXO set, which is a reflection of the contents of m_chain.
|
| |
Definition at line 15 of file mempool.h.