@ -294,9 +294,6 @@ public:
// Retrieve the CCoins (unspent transaction outputs) for a given txid
// Retrieve the CCoins (unspent transaction outputs) for a given txid
virtual bool GetCoins ( const uint256 & txid , CCoins & coins ) const ;
virtual bool GetCoins ( const uint256 & txid , CCoins & coins ) const ;
// Modify the CCoins for a given txid
virtual bool SetCoins ( const uint256 & txid , const CCoins & coins ) ;
// Just check whether we have data for a given txid.
// Just check whether we have data for a given txid.
// This may (but cannot always) return true for fully spent transactions
// This may (but cannot always) return true for fully spent transactions
virtual bool HaveCoins ( const uint256 & txid ) const ;
virtual bool HaveCoins ( const uint256 & txid ) const ;
@ -304,10 +301,7 @@ public:
// Retrieve the block hash whose state this CCoinsView currently represents
// Retrieve the block hash whose state this CCoinsView currently represents
virtual uint256 GetBestBlock ( ) const ;
virtual uint256 GetBestBlock ( ) const ;
// Modify the currently active block hash
// Do a bulk modification (multiple CCoins changes + BestBlock change).
virtual bool SetBestBlock ( const uint256 & hashBlock ) ;
// Do a bulk modification (multiple SetCoins + one SetBestBlock).
// The passed mapCoins can be modified.
// The passed mapCoins can be modified.
virtual bool BatchWrite ( CCoinsMap & mapCoins , const uint256 & hashBlock ) ;
virtual bool BatchWrite ( CCoinsMap & mapCoins , const uint256 & hashBlock ) ;
@ -328,10 +322,8 @@ protected:
public :
public :
CCoinsViewBacked ( CCoinsView & viewIn ) ;
CCoinsViewBacked ( CCoinsView & viewIn ) ;
bool GetCoins ( const uint256 & txid , CCoins & coins ) const ;
bool GetCoins ( const uint256 & txid , CCoins & coins ) const ;
bool SetCoins ( const uint256 & txid , const CCoins & coins ) ;
bool HaveCoins ( const uint256 & txid ) const ;
bool HaveCoins ( const uint256 & txid ) const ;
uint256 GetBestBlock ( ) const ;
uint256 GetBestBlock ( ) const ;
bool SetBestBlock ( const uint256 & hashBlock ) ;
void SetBackend ( CCoinsView & viewIn ) ;
void SetBackend ( CCoinsView & viewIn ) ;
bool BatchWrite ( CCoinsMap & mapCoins , const uint256 & hashBlock ) ;
bool BatchWrite ( CCoinsMap & mapCoins , const uint256 & hashBlock ) ;
bool GetStats ( CCoinsStats & stats ) const ;
bool GetStats ( CCoinsStats & stats ) const ;
@ -375,10 +367,9 @@ public:
// Standard CCoinsView methods
// Standard CCoinsView methods
bool GetCoins ( const uint256 & txid , CCoins & coins ) const ;
bool GetCoins ( const uint256 & txid , CCoins & coins ) const ;
bool SetCoins ( const uint256 & txid , const CCoins & coins ) ;
bool HaveCoins ( const uint256 & txid ) const ;
bool HaveCoins ( const uint256 & txid ) const ;
uint256 GetBestBlock ( ) const ;
uint256 GetBestBlock ( ) const ;
bool SetBestBlock ( const uint256 & hashBlock ) ;
void SetBestBlock ( const uint256 & hashBlock ) ;
bool BatchWrite ( CCoinsMap & mapCoins , const uint256 & hashBlock ) ;
bool BatchWrite ( CCoinsMap & mapCoins , const uint256 & hashBlock ) ;
// Return a pointer to CCoins in the cache, or NULL if not found. This is
// Return a pointer to CCoins in the cache, or NULL if not found. This is