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

Return a reference to Coin in the cache, or coinEmpty if not found&period; This is more efficient than GetCoin&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:Coin-04.adoc[Coin] const&
AccessCoin(xref:COutPoint.adoc[COutPoint] const& output) const;
----

== Description

Generally, do not hold the reference returned for more than a short scope&period; While the current implementation allows for modifications to the contents of the cache while holding the reference, this behavior should not be relied on! To be safe, best to not hold the returned reference through any other calls to this cache&period;

== Return Value

Reference to the cached coin, or an empty coin if not found&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *output*
| The outpoint whose coin to access&period;
|===


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