CCoinsView backed by the coin database (chainstate/)

Synopsis

Declared in <txdb.h>

class CCoinsViewDB final
    : public CCoinsView

Base Classes

Name

Description

CCoinsView

Pure abstract view on the open txout dataset.

Member Functions

Name

Description

CCoinsViewDB [constructor]

Constructs the view, opening the coin database with the given parameters.

~CCoinsViewDB [destructor] [virtual]

Destroys the view and releases the underlying database.

BatchWrite [virtual]

Writes a batch of coin changes to the database.

CompactFullAsync

Perform a full compaction of the underlying LevelDB on a one‐shot background thread.

Cursor

Get a cursor to iterate over the whole state.

EstimateSize [virtual]

Returns an estimate of the database size in bytes.

GetBestBlock [virtual]

Returns the hash of the best (tip) block recorded in the database.

GetCoin [virtual]

Returns the coin for an outpoint, if present.

GetDBProperty

Return an underlying LevelDB property value, if available.

GetHeadBlocks [virtual]

Returns the head block hashes recorded during an interrupted flush.

HaveCoin [virtual]

Returns whether a coin exists for an outpoint.

NeedsUpgrade

Whether an unsupported database format is used.

PeekCoin [virtual]

Returns the coin for an outpoint without caching the result.

ResizeCache

Dynamically alter the underlying leveldb cache size.

Protected Data Members

Name

Description

m_compaction

Shared future tracking an in‐progress background compaction.

m_db

The underlying coin database wrapper.

m_db_mutex

Prevents CompactFull() from using m_db while ResizeCache() replaces it.

m_db_params

Parameters used to open the underlying database.

m_options

User‐controlled performance and debug options.

Created with MrDocs