Pure abstract view on the open txout dataset.

Synopsis

Declared in <coins.h>

class CCoinsView;

Member Functions

Name

Description

~CCoinsView [destructor] [virtual]

As we use CCoinsViews polymorphically, have a virtual destructor

BatchWrite [virtual]

Do a bulk modification (multiple Coin changes + BestBlock change). The passed cursor is used to iterate through the coins.

EstimateSize [virtual]

Estimate database size

GetBestBlock [virtual]

Retrieve the block hash whose state this CCoinsView currently represents

GetCoin [virtual]

Retrieve the Coin (unspent transaction output) for a given outpoint. May populate the cache. Use PeekCoin() to perform a non‐caching lookup.

GetHeadBlocks [virtual]

Retrieve the range of blocks that may have been only partially written. If the database is in a consistent state, the result is the empty vector. Otherwise, a two‐element vector is returned consisting of the new and the old block hash, in that order.

HaveCoin [virtual]

Just check whether a given outpoint is unspent. May populate the cache. Use PeekCoin() to perform a non‐caching lookup.

PeekCoin [virtual]

Retrieve the Coin (unspent transaction output) for a given outpoint, without caching results. Does not populate the cache. Use GetCoin() to cache the result.

Derived Classes

Name

Description

CCoinsViewBacked

CCoinsView backed by another CCoinsView

CCoinsViewDB

CCoinsView backed by the coin database (chainstate/)

CoinsViewEmpty

Noop coins view.

Created with MrDocs