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

Constructs the index, which becomes available to be queried&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
TxoSpenderIndex(
    std::unique&lowbar;ptr&lt;interfaces::Chain&gt; chain,
    size&lowbar;t n&lowbar;cache&lowbar;size,
    bool f&lowbar;memory = false,
    bool f&lowbar;wipe = false);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *chain*
| Interface used to query the blockchain&period;
| *n&lowbar;cache&lowbar;size*
| Size of the database cache, in bytes&period;
| *f&lowbar;memory*
| Keep the database in memory instead of on disk&period;
| *f&lowbar;wipe*
| Erase any existing database before opening&period;
|===


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