 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
23 static const int64_t nDefaultDbCache = 100;
25 static const int64_t nMaxDbCache =
sizeof(
void*) > 4 ? 16384 : 1024;
27 static const int64_t nMinDbCache = 4;
34 template <
typename Stream,
typename Operation>
35 inline void SerializationOp(Stream& s, Operation ser_action,
int nType,
int nVersion)
64 CCoinsViewDB(
size_t nCacheSize,
bool fMemory =
false,
bool fWipe =
false);
77 CBlockTreeDB(
size_t nCacheSize,
bool fMemory =
false,
bool fWipe =
false);
85 bool WriteBatchSync(
const std::vector<std::pair<int, const CBlockFileInfo*> >& fileInfo,
int nLastFile,
const std::vector<const CBlockIndex*>& blockinfo);
91 bool WriteTxIndex(
const std::vector<std::pair<uint256, CDiskTxPos> >& list);
99 bool ReadKeyImages(
const std::string& keyImage, std::vector<uint256>& bhs);
103 #endif // BITCOIN_TXDB_H
bool GetCoins(const uint256 &txid, CCoins &coins) const
Retrieve the CCoins (unspent transaction outputs) for a given txid.
bool WriteInt(const std::string &name, int nValue)
CCoinsView backed by the LevelDB coin database (chainstate/)
bool GetStats(CCoinsStats &stats) const
Calculate statistics about the unspent transaction output set.
bool LoadBlockIndexGuts()
Used to marshal pointers into hashes for db storage.
bool ReadReindexing(bool &fReindex)
void operator=(const CBlockTreeDB &)
Abstract view on the open txout dataset.
bool WriteBlockIndex(const CDiskBlockIndex &blockindex)
bool HaveCoins(const uint256 &txid) const
Just check whether we have data for a given txid.
bool WriteBatchSync(const std::vector< std::pair< int, const CBlockFileInfo * > > &fileInfo, int nLastFile, const std::vector< const CBlockIndex * > &blockinfo)
bool ReadBlockFileInfo(int nFile, CBlockFileInfo &fileinfo)
Access to the block database (blocks/index/)
256-bit unsigned big integer.
bool ReadFlag(const std::string &name, bool &fValue)
uint256 GetBestBlock() const
Retrieve the block hash whose state this CCoinsView currently represents.
CCoinsViewDB(size_t nCacheSize, bool fMemory=false, bool fWipe=false)
bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock)
Do a bulk modification (multiple CCoins changes + BestBlock change).
bool ReadInt(const std::string &name, int &nValue)
bool WriteTxIndex(const std::vector< std::pair< uint256, CDiskTxPos > > &list)
bool WriteReindexing(bool fReindex)
bool WriteFlag(const std::string &name, bool fValue)
bool ReadTxIndex(const uint256 &txid, CDiskTxPos &pos)
std::atomic< bool > fReindex
CBlockTreeDB(size_t nCacheSize, bool fMemory=false, bool fWipe=false)
boost::unordered_map< uint256, CCoinsCacheEntry, CCoinsKeyHasher > CCoinsMap
bool ReadKeyImages(const std::string &keyImage, std::vector< uint256 > &bhs)
bool WriteKeyImage(const std::string &keyImage, const uint256 &height)
CDiskTxPos(const CDiskBlockPos &blockIn, unsigned int nTxOffsetIn)
bool ReadKeyImage(const std::string &keyImage, uint256 &bh)
void SerializationOp(Stream &s, Operation ser_action, int nType, int nVersion)
bool ReadLastBlockFile(int &nFile)