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

Lock an output so it is not selected for spending&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f2e1e598478), requires&lowbar;capability(0x7f2e11aa9238), requires&lowbar;capability(0x7f2e169ff028), requires&lowbar;capability(0x7f2e15f2e4c8), requires&lowbar;capability(0x7f2e12c6d158)&rsqb;&rsqb;
bool
LockCoin(
    xref:COutPoint.adoc[COutPoint] const& output,
    bool persist);
----

== Return Value

true if the lock was recorded&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *output*
| The outpoint to lock&period;
| *persist*
| Whether to persist the lock to disk&period;
|===


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