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

CCoinsView backed by another CCoinsView. More...

#include <coins.h>

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

Public Member Functions

 CCoinsViewBacked (CCoinsView *viewIn)
 
bool GetCoins (const uint256 &txid, CCoins &coins) const
 Retrieve the CCoins (unspent transaction outputs) for a given txid. More...
 
bool HaveCoins (const uint256 &txid) const
 Just check whether we have data for a given txid. More...
 
uint256 GetBestBlock () const
 Retrieve the block hash whose state this CCoinsView currently represents. More...
 
void SetBackend (CCoinsView &viewIn)
 
bool BatchWrite (CCoinsMap &mapCoins, const uint256 &hashBlock)
 Do a bulk modification (multiple CCoins changes + BestBlock change). More...
 
bool GetStats (CCoinsStats &stats) const
 Calculate statistics about the unspent transaction output set. More...
 
- Public Member Functions inherited from CCoinsView
virtual ~CCoinsView ()
 As we use CCoinsViews polymorphically, have a virtual destructor. More...
 

Protected Attributes

CCoinsViewbase
 

Detailed Description

CCoinsView backed by another CCoinsView.

Definition at line 372 of file coins.h.

Constructor & Destructor Documentation

◆ CCoinsViewBacked()

CCoinsViewBacked::CCoinsViewBacked ( CCoinsView viewIn)

Definition at line 73 of file coins.cpp.

Member Function Documentation

◆ BatchWrite()

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

Do a bulk modification (multiple CCoins changes + BestBlock change).

The passed mapCoins can be modified.

Reimplemented from CCoinsView.

Reimplemented in CCoinsViewCache.

Definition at line 78 of file coins.cpp.

Here is the call graph for this function:

◆ GetBestBlock()

uint256 CCoinsViewBacked::GetBestBlock ( ) const
virtual

Retrieve the block hash whose state this CCoinsView currently represents.

Reimplemented from CCoinsView.

Reimplemented in CCoinsViewCache.

Definition at line 76 of file coins.cpp.

Here is the call graph for this function:

◆ GetCoins()

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

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

Reimplemented from CCoinsView.

Reimplemented in CCoinsViewCache, CCoinsViewMemPool, and CCoinsViewErrorCatcher.

Definition at line 74 of file coins.cpp.

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

◆ GetStats()

bool CCoinsViewBacked::GetStats ( CCoinsStats stats) const
virtual

Calculate statistics about the unspent transaction output set.

Reimplemented from CCoinsView.

Definition at line 79 of file coins.cpp.

Here is the call graph for this function:

◆ HaveCoins()

bool CCoinsViewBacked::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 from CCoinsView.

Reimplemented in CCoinsViewCache, and CCoinsViewMemPool.

Definition at line 75 of file coins.cpp.

Here is the call graph for this function:

◆ SetBackend()

void CCoinsViewBacked::SetBackend ( CCoinsView viewIn)

Definition at line 77 of file coins.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ base

CCoinsView* CCoinsViewBacked::base
protected

Definition at line 375 of file coins.h.


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