34 static const int64_t
nMaxDbCache =
sizeof(
void*) > 4 ? 16384 : 1024;
44 CCoinsViewDB(
size_t nCacheSize,
bool fMemory =
false,
bool fWipe =
false);
57 CBlockTreeDB(
size_t nCacheSize,
bool fMemory =
false,
bool fWipe =
false);
62 bool WriteBatchSync(
const std::vector<std::pair<int, const CBlockFileInfo*> >& fileInfo,
int nLastFile,
const std::vector<const CBlockIndex*>& blockinfo);
68 bool WriteTxIndex(
const std::vector<std::pair<uint256, CDiskTxPos> > &list);
70 bool UpdateSpentIndex(
const std::vector<std::pair<CSpentIndexKey, CSpentIndexValue> >&vect);
73 std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > &vect);
74 bool WriteAddressIndex(
const std::vector<std::pair<CAddressIndexKey, CAmount> > &vect);
75 bool EraseAddressIndex(
const std::vector<std::pair<CAddressIndexKey, CAmount> > &vect);
77 std::vector<std::pair<CAddressIndexKey, CAmount> > &addressIndex,
78 int start = 0,
int end = 0);
86 #endif // BITCOIN_TXDB_H bool ReadBlockFileInfo(int nFile, CBlockFileInfo &fileinfo)
bool HaveCoins(const uint256 &txid) const
CBlockTreeDB(size_t nCacheSize, bool fMemory=false, bool fWipe=false)
bool ReadAddressUnspentIndex(uint160 addressHash, int type, std::vector< std::pair< CAddressUnspentKey, CAddressUnspentValue > > &vect)
bool ReadAddressIndex(uint160 addressHash, int type, std::vector< std::pair< CAddressIndexKey, CAmount > > &addressIndex, int start=0, int end=0)
bool WriteTxIndex(const std::vector< std::pair< uint256, CDiskTxPos > > &list)
boost::unordered_map< uint256, CCoinsCacheEntry, CCoinsKeyHasher > CCoinsMap
static const int64_t nMinDbCache
min. -dbcache in (MiB)
bool WriteFlag(const std::string &name, bool fValue)
uint256 GetBestBlock() const
Retrieve the block hash whose state this CCoinsView currently represents.
bool GetCoins(const uint256 &txid, CCoins &coins) const
Retrieve the CCoins (unspent transaction outputs) for a given txid.
bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock)
bool ReadSpentIndex(CSpentIndexKey &key, CSpentIndexValue &value)
void operator=(const CBlockTreeDB &)
static const int64_t nDefaultDbCache
-dbcache default (MiB)
bool ReadTxIndex(const uint256 &txid, CDiskTxPos &pos)
bool WriteBatchSync(const std::vector< std::pair< int, const CBlockFileInfo *> > &fileInfo, int nLastFile, const std::vector< const CBlockIndex *> &blockinfo)
CCoinsViewDB(size_t nCacheSize, bool fMemory=false, bool fWipe=false)
bool WriteTimestampIndex(const CTimestampIndexKey ×tampIndex)
bool GetStats(CCoinsStats &stats) const
Calculate statistics about the unspent transaction output set.
bool UpdateAddressUnspentIndex(const std::vector< std::pair< CAddressUnspentKey, CAddressUnspentValue > > &vect)
bool ReadTimestampIndex(const unsigned int &high, const unsigned int &low, std::vector< uint256 > &vect)
bool EraseAddressIndex(const std::vector< std::pair< CAddressIndexKey, CAmount > > &vect)
bool LoadBlockIndexGuts()
static const int64_t nMaxDbCache
max. -dbcache in (MiB)
bool ReadReindexing(bool &fReindex)
bool ReadLastBlockFile(int &nFile)
bool ReadFlag(const std::string &name, bool &fValue)
bool WriteAddressIndex(const std::vector< std::pair< CAddressIndexKey, CAmount > > &vect)
bool WriteReindexing(bool fReindex)
bool UpdateSpentIndex(const std::vector< std::pair< CSpentIndexKey, CSpentIndexValue > > &vect)