43 std::unique_ptr<CDBWrapper>
m_db;
54 std::unique_ptr<CCoinsViewCursor>
Cursor()
const override;
Mutex m_db_mutex
Prevents CompactFull() from using m_db while ResizeCache() replaces it.
std::shared_future< void > m_compaction
bool HaveCoin(const COutPoint &outpoint) const override
std::unique_ptr< CDBWrapper > m_db
CCoinsViewDB(DBParams db_params, CoinsViewOptions options)
std::optional< std::string > GetDBProperty(const std::string &property)
Return an underlying LevelDB property value, if available.
uint256 GetBestBlock() const override
Retrieve the block hash whose state this CCoinsView currently represents.
std::optional< Coin > GetCoin(const COutPoint &outpoint) const override
void ResizeCache(size_t new_cache_size) EXCLUSIVE_LOCKS_REQUIRED(cs_main
Dynamically alter the underlying leveldb cache size.
void BatchWrite(CoinsViewCacheCursor &cursor, const uint256 &hashBlock) override
std::unique_ptr< CCoinsViewCursor > Cursor() const override
Get a cursor to iterate over the whole state.
std::shared_future< void > CompactFull() EXCLUSIVE_LOCKS_REQUIRED(cs_main
Perform a full compaction of the underlying LevelDB on a one-shot background thread.
CoinsViewOptions m_options
std::vector< uint256 > GetHeadBlocks() const override
bool NeedsUpgrade()
Whether an unsupported database format is used.
size_t EstimateSize() const override
Estimate database size (0 if not implemented).
Abstract view on the open txout dataset.
An outpoint - a combination of a transaction hash and an index n into its vout.
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate.
static constexpr size_t DEFAULT_DB_CACHE_BATCH
Default LevelDB write batch size.
Cursor for iterating over the linked list of flagged entries in CCoinsViewCache.
User-controlled performance and debug options.
int simulate_crash_ratio
If non-zero, randomly exit when the database is flushed with (1/ratio) probability.
size_t batch_write_bytes
Maximum database write batch size in bytes.
Application-specific storage settings.
AnnotatedMixin< std::mutex > Mutex
Wrapped mutex: supports waiting but not recursive locking.
#define EXCLUSIVE_LOCKS_REQUIRED(...)