Changeset View
Changeset View
Standalone View
Standalone View
src/coins.h
Show First 20 Lines • Show All 164 Lines • ▼ Show 20 Lines | |||||
/** CCoinsView backed by another CCoinsView */ | /** CCoinsView backed by another CCoinsView */ | ||||
class CCoinsViewBacked : public CCoinsView { | class CCoinsViewBacked : public CCoinsView { | ||||
protected: | protected: | ||||
CCoinsView *base; | CCoinsView *base; | ||||
public: | public: | ||||
CCoinsViewBacked(CCoinsView *viewIn); | CCoinsViewBacked(CCoinsView *viewIn); | ||||
bool GetCoin(const COutPoint &outpoint, Coin &coin) const; | bool GetCoin(const COutPoint &outpoint, Coin &coin) const override; | ||||
bool HaveCoin(const COutPoint &outpoint) const; | bool HaveCoin(const COutPoint &outpoint) const override; | ||||
uint256 GetBestBlock() const; | uint256 GetBestBlock() const override; | ||||
void SetBackend(CCoinsView &viewIn); | void SetBackend(CCoinsView &viewIn); | ||||
bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock); | bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) override; | ||||
CCoinsViewCursor *Cursor() const; | CCoinsViewCursor *Cursor() const override; | ||||
size_t EstimateSize() const override; | size_t EstimateSize() const override; | ||||
}; | }; | ||||
/** | /** | ||||
* CCoinsView that adds a memory cache for transactions to another CCoinsView | * CCoinsView that adds a memory cache for transactions to another CCoinsView | ||||
*/ | */ | ||||
class CCoinsViewCache : public CCoinsViewBacked { | class CCoinsViewCache : public CCoinsViewBacked { | ||||
protected: | protected: | ||||
▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |