CCoinsViewCache::SpendCoin

Spend a coin. Pass moveto in order to get the deleted data. If no unspent output exists for the passed outpoint, this call has no effect.

Synopsis

Declared in <coins.h>

bool
SpendCoin(
    COutPoint const& outpoint,
    Coin* moveto = nullptr);

Return Value

True if a coin was found and spent.

Parameters

NameDescription
outpointThe outpoint of the coin to spend.
movetoIf non-null, receives the spent coin's data.