PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Public Member Functions | List of all members
CCoinsView Class Reference

Abstract view on the open txout dataset. More...

#include <coins.h>

Inheritance diagram for CCoinsView:
[legend]

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
 Just check whether we have data for a given txid. More...
 
virtual uint256 GetBestBlock () const
 Retrieve the block hash whose state this CCoinsView currently represents. More...
 
virtual bool BatchWrite (CCoinsMap &mapCoins, const uint256 &hashBlock)
 Do a bulk modification (multiple CCoins changes + BestBlock change). More...
 
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 346 of file coins.h.

Constructor & Destructor Documentation

◆ ~CCoinsView()

virtual CCoinsView::~CCoinsView ( )
inlinevirtual

As we use CCoinsViews polymorphically, have a virtual destructor.

Definition at line 367 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 69 of file coins.cpp.

Here is the caller graph for this function:

◆ 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 68 of file coins.cpp.

Here is the caller graph for this function:

◆ GetCoins()

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

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

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

Definition at line 66 of file coins.cpp.

Here is the caller graph for this function:

◆ GetStats()

bool CCoinsView::GetStats ( CCoinsStats stats) const
virtual

Calculate statistics about the unspent transaction output set.

Reimplemented in CCoinsViewBacked, and CCoinsViewDB.

Definition at line 70 of file coins.cpp.

Here is the caller graph for this function:

◆ 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 CCoinsViewCache, CCoinsViewBacked, CCoinsViewMemPool, and CCoinsViewDB.

Definition at line 67 of file coins.cpp.

Here is the caller graph for this function:

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