wallet::CWallet::SetSpentKeyState

Record whether the key behind a transaction output has been spent.

Synopsis

Declared in <wallet/wallet.h>

[[requires_capability(0x7f2e1e598178), requires_capability(0x7f2e11aa8f38), requires_capability(0x7f2e169fed28), requires_capability(0x7f2e15f2e1c8), requires_capability(0x7f2e12c6ce58)]]
void
SetSpentKeyState(
    WalletBatch& batch,
    Txid const& hash,
    unsigned int n,
    bool used,
    std::set<CTxDestination>& tx_destinations);

Parameters

NameDescription
batchThe database batch to write through.
hashThe txid of the output.
nThe output index within the transaction.
usedWhether the key is marked as used/spent.
tx_destinationsSet to the destinations affected by the update.