Changeset View
Changeset View
Standalone View
Standalone View
src/txdb.h
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
static const int64_t nMaxCoinsDBCache = 8; | static const int64_t nMaxCoinsDBCache = 8; | ||||
/** CCoinsView backed by the coin database (chainstate/) */ | /** CCoinsView backed by the coin database (chainstate/) */ | ||||
class CCoinsViewDB final : public CCoinsView { | class CCoinsViewDB final : public CCoinsView { | ||||
protected: | protected: | ||||
CDBWrapper db; | CDBWrapper db; | ||||
public: | public: | ||||
explicit CCoinsViewDB(size_t nCacheSize, bool fMemory = false, | /** | ||||
bool fWipe = false); | * @param[in] ldb_path Location in the filesystem where leveldb data will | ||||
* be stored. | |||||
*/ | |||||
explicit CCoinsViewDB(fs::path ldb_path, size_t nCacheSize, bool fMemory, | |||||
bool fWipe); | |||||
bool GetCoin(const COutPoint &outpoint, Coin &coin) const override; | bool GetCoin(const COutPoint &outpoint, Coin &coin) const override; | ||||
bool HaveCoin(const COutPoint &outpoint) const override; | bool HaveCoin(const COutPoint &outpoint) const override; | ||||
BlockHash GetBestBlock() const override; | BlockHash GetBestBlock() const override; | ||||
std::vector<BlockHash> GetHeadBlocks() const override; | std::vector<BlockHash> GetHeadBlocks() const override; | ||||
bool BatchWrite(CCoinsMap &mapCoins, const BlockHash &hashBlock) override; | bool BatchWrite(CCoinsMap &mapCoins, const BlockHash &hashBlock) override; | ||||
CCoinsViewCursor *Cursor() const override; | CCoinsViewCursor *Cursor() const override; | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |