[#TxoSpenderIndex-FindSpender]
= xref:TxoSpenderIndex.adoc[TxoSpenderIndex]::FindSpender
:relfileprefix: ../
:mrdocs:

Search the index for a transaction that spends the given outpoint&period;

== Synopsis

Declared in `&lt;index&sol;txospenderindex&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:util/Expected-0b.adoc[util::Expected&lt;std::optional&lt;TxoSpender&gt;, std::string&gt;]
FindSpender(xref:COutPoint.adoc[COutPoint] const& txo) const;
----

== Return Value

std&colon;&colon;nullopt if the outpoint has not been spent on&hyphen;chain&period; std&colon;&colon;optional&lcub;TxoSpender&rcub; if the output has been spent on&hyphen;chain&period; Contains the spending transaction and the block it was confirmed in&period; util&colon;&colon;Unexpected&lcub;error&rcub; if something unexpected happened (i&period;e&period; disk or deserialization error)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *txo* [in]
| The outpoint to search for&period;
|===


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