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

CCoinsView backed by the LevelDB coin database (chainstate/) More...

#include <txdb.h>

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

Public Member Functions

 CCoinsViewDB (size_t nCacheSize, bool fMemory=false, bool fWipe=false)
 
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...
 
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

CDBWrapper db
 

Detailed Description

CCoinsView backed by the LevelDB coin database (chainstate/)

Definition at line 58 of file txdb.h.

Constructor & Destructor Documentation

◆ CCoinsViewDB()

CCoinsViewDB::CCoinsViewDB ( size_t  nCacheSize,
bool  fMemory = false,
bool  fWipe = false 
)

Definition at line 31 of file txdb.cpp.

Member Function Documentation

◆ BatchWrite()

bool CCoinsViewDB::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.

Definition at line 53 of file txdb.cpp.

◆ GetBestBlock()

uint256 CCoinsViewDB::GetBestBlock ( ) const
virtual

Retrieve the block hash whose state this CCoinsView currently represents.

Reimplemented from CCoinsView.

Definition at line 45 of file txdb.cpp.

Here is the call graph for this function:

◆ GetCoins()

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

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

Reimplemented from CCoinsView.

Definition at line 35 of file txdb.cpp.

Here is the call graph for this function:

◆ GetStats()

bool CCoinsViewDB::GetStats ( CCoinsStats stats) const
virtual

Calculate statistics about the unspent transaction output set.

Reimplemented from CCoinsView.

Definition at line 111 of file txdb.cpp.

◆ HaveCoins()

bool CCoinsViewDB::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.

Definition at line 40 of file txdb.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ db

CDBWrapper CCoinsViewDB::db
protected

Definition at line 61 of file txdb.h.


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