[#CCoinsViewCache-SpendCoin] = xref:CCoinsViewCache.adoc[CCoinsViewCache]::SpendCoin :relfileprefix: ../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool SpendCoin( xref:COutPoint.adoc[COutPoint] const& outpoint, xref:Coin-04.adoc[Coin]* moveto = nullptr); ---- == Return Value True if a coin was found and spent. == Parameters [cols="1,4"] |=== | Name| Description | *outpoint* | The outpoint of the coin to spend. | *moveto* | If non‐null, receives the spent coin's data. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#