Bitcoin Core 32.1.0
P2P Digital Currency
Loading...
Searching...
No Matches
CoinsViewEmpty Class Reference

Noop coins view. More...

#include <coins.h>

Inheritance diagram for CoinsViewEmpty:
[legend]
Collaboration diagram for CoinsViewEmpty:
[legend]

Public Member Functions

 CoinsViewEmpty (const CoinsViewEmpty &)=delete
CoinsViewEmpty & operator= (const CoinsViewEmpty &)=delete
std::optional< Coin > GetCoin (const COutPoint &) const override
std::optional< Coin > PeekCoin (const COutPoint &outpoint) const override
bool HaveCoin (const COutPoint &outpoint) const override
uint256 GetBestBlock () const override
 Retrieve the block hash whose state this CCoinsView currently represents.
std::vector< uint256 > GetHeadBlocks () const override
void BatchWrite (CoinsViewCacheCursor &cursor, const uint256 &) override
size_t EstimateSize () const override
 Estimate database size.
Public Member Functions inherited from CCoinsView
virtual ~CCoinsView ()=default
 As we use CCoinsViews polymorphically, have a virtual destructor.

Static Public Member Functions

static CoinsViewEmpty & Get ()

Protected Member Functions

 CoinsViewEmpty ()=default

Detailed Description

Noop coins view.

Definition at line 391 of file coins.h.

Constructor & Destructor Documentation

◆ CoinsViewEmpty() [1/2]

CoinsViewEmpty::CoinsViewEmpty ( )
protecteddefault
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CoinsViewEmpty() [2/2]

CoinsViewEmpty::CoinsViewEmpty ( const CoinsViewEmpty & )
delete
Here is the call graph for this function:

Member Function Documentation

◆ BatchWrite()

void CoinsViewEmpty::BatchWrite ( CoinsViewCacheCursor & cursor,
const uint256 & block_hash )
inlineoverridevirtual

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

Implements CCoinsView.

Definition at line 407 of file coins.h.

Here is the call graph for this function:

◆ EstimateSize()

size_t CoinsViewEmpty::EstimateSize ( ) const
inlineoverridevirtual

Estimate database size.

Implements CCoinsView.

Definition at line 411 of file coins.h.

◆ Get()

CoinsViewEmpty & CoinsViewEmpty::Get ( )
static

Definition at line 29 of file coins.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBestBlock()

uint256 CoinsViewEmpty::GetBestBlock ( ) const
inlineoverridevirtual

Retrieve the block hash whose state this CCoinsView currently represents.

Implements CCoinsView.

Definition at line 405 of file coins.h.

◆ GetCoin()

std::optional< Coin > CoinsViewEmpty::GetCoin ( const COutPoint & outpoint) const
inlineoverridevirtual

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

Implements CCoinsView.

Definition at line 402 of file coins.h.

Here is the caller graph for this function:

◆ GetHeadBlocks()

std::vector< uint256 > CoinsViewEmpty::GetHeadBlocks ( ) const
inlineoverridevirtual

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.

Implements CCoinsView.

Definition at line 406 of file coins.h.

◆ HaveCoin()

bool CoinsViewEmpty::HaveCoin ( const COutPoint & outpoint) const
inlineoverridevirtual

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

Implements CCoinsView.

Definition at line 404 of file coins.h.

Here is the call graph for this function:

◆ operator=()

CoinsViewEmpty & CoinsViewEmpty::operator= ( const CoinsViewEmpty & )
delete
Here is the call graph for this function:

◆ PeekCoin()

std::optional< Coin > CoinsViewEmpty::PeekCoin ( const COutPoint & outpoint) const
inlineoverridevirtual

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

Implements CCoinsView.

Definition at line 403 of file coins.h.

Here is the call graph for this function:

The documentation for this class was generated from the following files: