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

Name

Description

outpoint

The outpoint of the coin to spend.

moveto

If non‐null, receives the spent coin's data.

Created with MrDocs