[#CCoinsViewCache-AddCoin]
= xref:CCoinsViewCache.adoc[CCoinsViewCache]::AddCoin
:relfileprefix: ../
:mrdocs:

Add a coin&period; Set possible&lowbar;overwrite to true if an unspent version may already exist in the cache&period;

== Synopsis

Declared in `&lt;coins&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
AddCoin(
    xref:COutPoint.adoc[COutPoint] const& outpoint,
    xref:Coin-04.adoc[Coin]&& coin,
    bool possible&lowbar;overwrite);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *outpoint*
| The outpoint to add the coin under&period;
| *coin*
| The coin to add (moved into the cache)&period;
| *possible&lowbar;overwrite*
| Set to true if an unspent version may already exist in the cache&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
