![]() |
Bitcoin Core 30.99.0
P2P Digital Currency
|
#include <validation.h>
Public Member Functions | |
| void | CleanupForFuzzing () |
| Test-only method to clear internal state for fuzzing. More... | |
Public Member Functions inherited from node::BlockManager | |
| BlockManager (const util::SignalInterrupt &interrupt, Options opts) | |
| BlockMap m_block_index | GUARDED_BY (cs_main) |
| std::unique_ptr< BlockTreeDB > m_block_tree_db | GUARDED_BY (::cs_main) |
| CBlockIndex * | InsertBlockIndex (const uint256 &hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| Create a new block index entry for a given block hash. More... | |
| void | PruneOneBlockFile (const int fileNumber) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| Mark one block file as pruned (modify associated database entries) More... | |
| CBlockIndex * | LookupBlockIndex (const uint256 &hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| const CBlockIndex * | LookupBlockIndex (const uint256 &hash) const EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| CBlockFileInfo * | GetBlockFileInfo (size_t n) |
| Get block file info entry for one block file. More... | |
| void | UpdateBlockInfo (const CBlock &block, unsigned int nHeight, const FlatFilePos &pos) |
| Update blockfile info while processing a block during reindex. More... | |
| bool | IsPruneMode () const |
| Whether running in -prune mode. More... | |
| uint64_t | GetPruneTarget () const |
| Attempt to stay below this number of bytes of block files. More... | |
| bool | LoadingBlocks () const |
| uint64_t | CalculateCurrentUsage () |
| Calculate the amount of disk space the block & undo files currently use. More... | |
| fs::path | GetBlockPosFilename (const FlatFilePos &pos) const |
| Translation to a filesystem path. More... | |
| void | UnlinkPrunedFiles (const std::set< int > &setFilesToPrune) const |
| Actually unlink the specified files. More... | |
| bool | ReadBlock (CBlock &block, const FlatFilePos &pos, const std::optional< uint256 > &expected_hash) const |
| Functions for disk access for blocks. More... | |
| bool | ReadBlock (CBlock &block, const CBlockIndex &index) const |
| ReadRawBlockResult | ReadRawBlock (const FlatFilePos &pos, std::optional< std::pair< size_t, size_t > > block_part=std::nullopt) const |
| bool | ReadBlockUndo (CBlockUndo &blockundo, const CBlockIndex &index) const |
| void | CleanupBlockRevFiles () const |
Additional Inherited Members | |
Public Types inherited from node::BlockManager | |
| using | Options = kernel::BlockManagerOpts |
| using | ReadRawBlockResult = util::Expected< std::vector< std::byte >, ReadRawError > |
Public Attributes inherited from node::BlockManager | |
| const util::SignalInterrupt & | m_interrupt |
| std::atomic< bool > | m_importing {false} |
| std::atomic_bool | m_blockfiles_indexed {true} |
| Whether all blockfiles have been added to the block tree database. More... | |
| std::optional< int > | m_snapshot_height |
| The height of the base block of an assumeutxo snapshot, if one is in use. More... | |
| std::vector< CBlockIndex * > GetAllBlockIndices() EXCLUSIVE_LOCKS_REQUIRED(std::multimap< CBlockIndex *, CBlockIndex * > | m_blocks_unlinked |
| All pairs A->B, where A (or one of its ancestors) misses transactions, but B has transactions. More... | |
| void WriteBlockIndexDB() EXCLUSIVE_LOCKS_REQUIRED(bool LoadBlockIndexDB(const std::optional< uint256 > &snapshot_blockhash) EXCLUSIVE_LOCKS_REQUIRED(void ScanAndUnlinkAlreadyPrunedFiles() EXCLUSIVE_LOCKS_REQUIRED(CBlockIndex * | AddToBlockIndex (const CBlockHeader &block, CBlockIndex *&best_header) EXCLUSIVE_LOCKS_REQUIRED(cs_main) |
| Remove any pruned block & undo files that are still on disk. More... | |
| bool WriteBlockUndo(const CBlockUndo &blockundo, BlockValidationState &state, CBlockIndex &block) EXCLUSIVE_LOCKS_REQUIRED(FlatFilePos | WriteBlock (const CBlock &block, int nHeight) |
| Store block on disk and update block file statistics. More... | |
| bool CheckBlockDataAvailability(const CBlockIndex &upper_block, const CBlockIndex &lower_block) EXCLUSIVE_LOCKS_REQUIRED(const CBlockIndex &GetFirstBlock(const CBlockIndex &upper_block LIFETIMEBOUND, uint32_t status_mask, const CBlockIndex *lower_block LIFETIMEBOUND=nullptr) const EXCLUSIVE_LOCKS_REQUIRED(boo | m_have_pruned ) = false |
| Check if all blocks in the [upper_block, lower_block] range have data available. More... | |
| bool IsBlockPruned(const CBlockIndex &block) const EXCLUSIVE_LOCKS_REQUIRED(void UpdatePruneLock(const std::string &name, const PruneLockInfo &lock_info) EXCLUSIVE_LOCKS_REQUIRED(AutoFile | OpenBlockFile (const FlatFilePos &pos, bool fReadOnly) const |
| Check whether the block associated with this index entry is pruned or not. More... | |
Static Public Attributes inherited from node::BlockManager | |
| static constexpr auto | PRUNE_TARGET_MANUAL {std::numeric_limits<uint64_t>::max()} |
Protected Attributes inherited from node::BlockManager | |
| std::vector< CBlockFileInfo > | m_blockfile_info |
| std::set< CBlockIndex * > | m_dirty_blockindex |
| Dirty block index entries. More... | |
| std::set< int > | m_dirty_fileinfo |
| Dirty block file entries. More... | |
Definition at line 15 of file validation.h.
| void TestBlockManager::CleanupForFuzzing | ( | ) |
Test-only method to clear internal state for fuzzing.
Definition at line 15 of file validation.cpp.