[#wallet-CWallet-SetAddressPreviouslySpent]
= xref:wallet.adoc[wallet]::xref:wallet/CWallet.adoc[CWallet]::SetAddressPreviouslySpent
:relfileprefix: ../../
:mrdocs:

Record whether a destination has been previously spent&period;

== Synopsis

Declared in `&lt;wallet&sol;wallet&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f2e1e599728), requires&lowbar;capability(0x7f2e11aaa4e8), requires&lowbar;capability(0x7f2e16a002d8), requires&lowbar;capability(0x7f2e15f2f778), requires&lowbar;capability(0x7f2e12c6e408)&rsqb;&rsqb;
bool
SetAddressPreviouslySpent(
    xref:wallet/WalletBatch.adoc[WalletBatch]& batch,
    xref:CTxDestination.adoc[CTxDestination] const& dest,
    bool used);
----

== Return Value

true if the state was written&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *batch*
| The database batch to write through&period;
| *dest*
| The destination to update&period;
| *used*
| Whether the destination is marked as spent&period;
|===


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