|
|
@ -291,8 +291,9 @@ public: |
|
|
|
// Modify the currently active block hash
|
|
|
|
// Modify the currently active block hash
|
|
|
|
virtual bool SetBestBlock(const uint256 &hashBlock); |
|
|
|
virtual bool SetBestBlock(const uint256 &hashBlock); |
|
|
|
|
|
|
|
|
|
|
|
// Do a bulk modification (multiple SetCoins + one SetBestBlock)
|
|
|
|
// Do a bulk modification (multiple SetCoins + one SetBestBlock).
|
|
|
|
virtual bool BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock); |
|
|
|
// The passed mapCoins can be modified.
|
|
|
|
|
|
|
|
virtual bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock); |
|
|
|
|
|
|
|
|
|
|
|
// Calculate statistics about the unspent transaction output set
|
|
|
|
// Calculate statistics about the unspent transaction output set
|
|
|
|
virtual bool GetStats(CCoinsStats &stats); |
|
|
|
virtual bool GetStats(CCoinsStats &stats); |
|
|
@ -316,7 +317,7 @@ public: |
|
|
|
uint256 GetBestBlock(); |
|
|
|
uint256 GetBestBlock(); |
|
|
|
bool SetBestBlock(const uint256 &hashBlock); |
|
|
|
bool SetBestBlock(const uint256 &hashBlock); |
|
|
|
void SetBackend(CCoinsView &viewIn); |
|
|
|
void SetBackend(CCoinsView &viewIn); |
|
|
|
bool BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock); |
|
|
|
bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock); |
|
|
|
bool GetStats(CCoinsStats &stats); |
|
|
|
bool GetStats(CCoinsStats &stats); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -337,7 +338,7 @@ public: |
|
|
|
bool HaveCoins(const uint256 &txid); |
|
|
|
bool HaveCoins(const uint256 &txid); |
|
|
|
uint256 GetBestBlock(); |
|
|
|
uint256 GetBestBlock(); |
|
|
|
bool SetBestBlock(const uint256 &hashBlock); |
|
|
|
bool SetBestBlock(const uint256 &hashBlock); |
|
|
|
bool BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock); |
|
|
|
bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock); |
|
|
|
|
|
|
|
|
|
|
|
// Return a modifiable reference to a CCoins. Check HaveCoins first.
|
|
|
|
// Return a modifiable reference to a CCoins. Check HaveCoins first.
|
|
|
|
// Many methods explicitly require a CCoinsViewCache because of this method, to reduce
|
|
|
|
// Many methods explicitly require a CCoinsViewCache because of this method, to reduce
|
|
|
@ -346,6 +347,7 @@ public: |
|
|
|
|
|
|
|
|
|
|
|
// Push the modifications applied to this cache to its base.
|
|
|
|
// Push the modifications applied to this cache to its base.
|
|
|
|
// Failure to call this method before destruction will cause the changes to be forgotten.
|
|
|
|
// Failure to call this method before destruction will cause the changes to be forgotten.
|
|
|
|
|
|
|
|
// If false is returned, the state of this cache (and its backing view) will be undefined.
|
|
|
|
bool Flush(); |
|
|
|
bool Flush(); |
|
|
|
|
|
|
|
|
|
|
|
// Calculate the size of the cache (in number of transactions)
|
|
|
|
// Calculate the size of the cache (in number of transactions)
|
|
|
|