PIVX Core  5.6.99
P2P Digital Currency
Public Member Functions | Private Member Functions | List of all members
CZerocoinDB Class Reference

Zerocoin database (zerocoin/) More...

#include <txdb.h>

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

Public Member Functions

 CZerocoinDB (size_t nCacheSize, bool fMemory=false, bool fWipe=false)
 
bool WriteCoinSpendBatch (const std::vector< std::pair< CBigNum, uint256 > > &spendInfo)
 Write zPIV spends to the zerocoinDB in a batch Pair of: CBigNum -> coinSerialNumber and uint256 -> txHash. More...
 
bool ReadCoinSpend (const CBigNum &bnSerial, uint256 &txHash)
 
bool EraseCoinSpend (const CBigNum &bnSerial)
 
bool WriteAccChecksum (const uint32_t nChecksum, const libzerocoin::CoinDenomination denom, const int nHeight)
 Accumulators (only for zPoS IBD): [checksum, denom] --> block height. More...
 
bool ReadAccChecksum (const uint32_t nChecksum, const libzerocoin::CoinDenomination denom, int &nHeightRet)
 
bool ReadAll (std::map< std::pair< uint32_t, libzerocoin::CoinDenomination >, int > &mapCheckpoints)
 
bool EraseAccChecksum (const uint32_t nChecksum, const libzerocoin::CoinDenomination denom)
 
void WipeAccChecksums ()
 
- Public Member Functions inherited from CDBWrapper
 CDBWrapper (const fs::path &path, size_t nCacheSize, bool fMemory=false, bool fWipe=false, int nVersion=CLIENT_VERSION)
 
 ~CDBWrapper ()
 
template<typename K >
bool ReadDataStream (const K &key, CDataStream &ssValue) const
 
bool ReadDataStream (const CDataStream &ssKey, CDataStream &ssValue) const
 
template<typename K , typename V >
bool Read (const K &key, V &value) const
 
template<typename V >
bool Read (const CDataStream &ssKey, V &value) const
 
template<typename K , typename V >
bool Write (const K &key, const V &value, bool fSync=false)
 
template<typename K >
bool Exists (const K &key) const
 
bool Exists (const CDataStream &key) const
 
template<typename K >
bool Erase (const K &key, bool fSync=false)
 
bool WriteBatch (CDBBatch &batch, bool fSync=false)
 
bool Flush ()
 
bool Sync ()
 
CDBIteratorNewIterator ()
 
bool IsEmpty ()
 Return true if the database managed by this class contains no entries. More...
 
template<typename K >
size_t EstimateSize (const K &key_begin, const K &key_end) const
 
template<typename K >
void CompactRange (const K &key_begin, const K &key_end) const
 Compact a certain range of keys in the database. More...
 
void CompactFull () const
 

Private Member Functions

 CZerocoinDB (const CZerocoinDB &)
 
void operator= (const CZerocoinDB &)
 

Detailed Description

Zerocoin database (zerocoin/)

Definition at line 151 of file txdb.h.

Constructor & Destructor Documentation

◆ CZerocoinDB() [1/2]

CZerocoinDB::CZerocoinDB ( size_t  nCacheSize,
bool  fMemory = false,
bool  fWipe = false 
)
explicit

Definition at line 344 of file txdb.cpp.

◆ CZerocoinDB() [2/2]

CZerocoinDB::CZerocoinDB ( const CZerocoinDB )
private

Member Function Documentation

◆ EraseAccChecksum()

bool CZerocoinDB::EraseAccChecksum ( const uint32_t  nChecksum,
const libzerocoin::CoinDenomination  denom 
)

Definition at line 397 of file txdb.cpp.

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

◆ EraseCoinSpend()

bool CZerocoinDB::EraseCoinSpend ( const CBigNum bnSerial)

Definition at line 374 of file txdb.cpp.

Here is the call graph for this function:

◆ operator=()

void CZerocoinDB::operator= ( const CZerocoinDB )
private

◆ ReadAccChecksum()

bool CZerocoinDB::ReadAccChecksum ( const uint32_t  nChecksum,
const libzerocoin::CoinDenomination  denom,
int &  nHeightRet 
)

Definition at line 392 of file txdb.cpp.

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

◆ ReadAll()

bool CZerocoinDB::ReadAll ( std::map< std::pair< uint32_t, libzerocoin::CoinDenomination >, int > &  mapCheckpoints)

Definition at line 402 of file txdb.cpp.

Here is the caller graph for this function:

◆ ReadCoinSpend()

bool CZerocoinDB::ReadCoinSpend ( const CBigNum bnSerial,
uint256 txHash 
)

Definition at line 365 of file txdb.cpp.

Here is the call graph for this function:

◆ WipeAccChecksums()

void CZerocoinDB::WipeAccChecksums ( )

Definition at line 426 of file txdb.cpp.

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

◆ WriteAccChecksum()

bool CZerocoinDB::WriteAccChecksum ( const uint32_t  nChecksum,
const libzerocoin::CoinDenomination  denom,
const int  nHeight 
)

Accumulators (only for zPoS IBD): [checksum, denom] --> block height.

Todo:
: add removal for LZC_MAPSUPPLY key-value if is found in db

Definition at line 387 of file txdb.cpp.

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

◆ WriteCoinSpendBatch()

bool CZerocoinDB::WriteCoinSpendBatch ( const std::vector< std::pair< CBigNum, uint256 > > &  spendInfo)

Write zPIV spends to the zerocoinDB in a batch Pair of: CBigNum -> coinSerialNumber and uint256 -> txHash.

Definition at line 348 of file txdb.cpp.


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