[#wallet-CWallet-SetSpentKeyState] = xref:wallet.adoc[wallet]::xref:wallet/CWallet.adoc[CWallet]::SetSpentKeyState :relfileprefix: ../../ :mrdocs: Record whether the key behind a transaction output has been spent. == Synopsis Declared in `<wallet/wallet.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[requires_capability(0x7f2e1e598178), requires_capability(0x7f2e11aa8f38), requires_capability(0x7f2e169fed28), requires_capability(0x7f2e15f2e1c8), requires_capability(0x7f2e12c6ce58)]] void SetSpentKeyState( xref:wallet/WalletBatch.adoc[WalletBatch]& batch, xref:Txid.adoc[Txid] const& hash, unsigned int n, bool used, std::set<CTxDestination>& tx_destinations); ---- == Parameters [cols="1,4"] |=== | Name| Description | *batch* | The database batch to write through. | *hash* | The txid of the output. | *n* | The output index within the transaction. | *used* | Whether the key is marked as used/spent. | *tx_destinations* | Set to the destinations affected by the update. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#