Changeset View
Changeset View
Standalone View
Standalone View
src/coins.h
Show First 20 Lines • Show All 511 Lines • ▼ Show 20 Lines | public: | ||||
* is more efficient than GetCoin. Modifications to other cache entries are | * is more efficient than GetCoin. Modifications to other cache entries are | ||||
* allowed while accessing the returned pointer. | * allowed while accessing the returned pointer. | ||||
* TODO: return a reference instead of a value once underlying storage is | * TODO: return a reference instead of a value once underlying storage is | ||||
* updated. | * updated. | ||||
*/ | */ | ||||
const Coin AccessCoin(const COutPoint &output) const; | const Coin AccessCoin(const COutPoint &output) const; | ||||
/** | /** | ||||
* Return a modifiable reference to a CCoins. If no entry with the given | |||||
* txid exists, a new one is created. Simultaneous modifications are not | |||||
* allowed. | |||||
*/ | |||||
CCoinsModifier ModifyCoins(const uint256 &txid); | |||||
/** | |||||
* Add a coin. Set potential_overwrite to true if a non-pruned version may | * Add a coin. Set potential_overwrite to true if a non-pruned version may | ||||
* already exist. | * already exist. | ||||
*/ | */ | ||||
void AddCoin(const COutPoint &outpoint, const Coin &coin, | void AddCoin(const COutPoint &outpoint, const Coin &coin, | ||||
bool potential_overwrite); | bool potential_overwrite); | ||||
/** | /** | ||||
* Spend a coin. Pass moveto in order to get the deleted data. | * Spend a coin. Pass moveto in order to get the deleted data. | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |