Dash Core  0.12.2.1
P2P Digital Currency
CCoinsView Class Reference

#include <coins.h>

+ Inheritance diagram for CCoinsView:

Public Member Functions

virtual bool GetCoins (const uint256 &txid, CCoins &coins) const
 Retrieve the CCoins (unspent transaction outputs) for a given txid. More...
 
virtual bool HaveCoins (const uint256 &txid) const
 
virtual uint256 GetBestBlock () const
 Retrieve the block hash whose state this CCoinsView currently represents. More...
 
virtual bool BatchWrite (CCoinsMap &mapCoins, const uint256 &hashBlock)
 
virtual bool GetStats (CCoinsStats &stats) const
 Calculate statistics about the unspent transaction output set. More...
 
virtual ~CCoinsView ()
 As we use CCoinsViews polymorphically, have a virtual destructor. More...
 

Detailed Description

Abstract view on the open txout dataset.

Definition at line 315 of file coins.h.

Constructor & Destructor Documentation

◆ ~CCoinsView()

virtual CCoinsView::~CCoinsView ( )
inlinevirtual

As we use CCoinsViews polymorphically, have a virtual destructor.

Definition at line 336 of file coins.h.

Member Function Documentation

◆ BatchWrite()

bool CCoinsView::BatchWrite ( CCoinsMap mapCoins,
const uint256 hashBlock 
)
virtual

Do a bulk modification (multiple CCoins changes + BestBlock change). The passed mapCoins can be modified.

Reimplemented in CCoinsViewCache, CCoinsViewBacked, and CCoinsViewDB.

Definition at line 47 of file coins.cpp.

Referenced by CCoinsViewBacked::BatchWrite(), and CCoinsViewCache::Flush().

◆ GetBestBlock()

uint256 CCoinsView::GetBestBlock ( ) const
virtual

Retrieve the block hash whose state this CCoinsView currently represents.

Reimplemented in CCoinsViewCache, CCoinsViewBacked, and CCoinsViewDB.

Definition at line 46 of file coins.cpp.

Referenced by CCoinsViewBacked::GetBestBlock(), and CCoinsViewCache::GetBestBlock().

◆ GetCoins()

bool CCoinsView::GetCoins ( const uint256 txid,
CCoins coins 
) const
virtual

Retrieve the CCoins (unspent transaction outputs) for a given txid.

Reimplemented in CCoinsViewMemPool, CCoinsViewCache, CCoinsViewBacked, CCoinsViewErrorCatcher, and CCoinsViewDB.

Definition at line 44 of file coins.cpp.

Referenced by CCoinsViewCache::FetchCoins(), CCoinsViewBacked::GetCoins(), CCoinsViewMemPool::GetCoins(), and CCoinsViewCache::ModifyCoins().

◆ GetStats()

bool CCoinsView::GetStats ( CCoinsStats stats) const
virtual

Calculate statistics about the unspent transaction output set.

Reimplemented in CCoinsViewBacked, and CCoinsViewDB.

Definition at line 48 of file coins.cpp.

Referenced by CCoinsViewBacked::GetStats().

◆ HaveCoins()

bool CCoinsView::HaveCoins ( const uint256 txid) const
virtual

Just check whether we have data for a given txid. This may (but cannot always) return true for fully spent transactions

Reimplemented in CCoinsViewMemPool, CCoinsViewCache, CCoinsViewBacked, and CCoinsViewDB.

Definition at line 45 of file coins.cpp.

Referenced by CCoinsViewBacked::HaveCoins(), and CCoinsViewMemPool::HaveCoins().


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