TxoSpenderIndex::FindSpender

Search the index for a transaction that spends the given outpoint.

Synopsis

Declared in <index/txospenderindex.h>

util::Expected<std::optional<TxoSpender>, std::string>
FindSpender(COutPoint const& txo) const;

Return Value

std::nullopt if the outpoint has not been spent on-chain. std::optional{TxoSpender} if the output has been spent on-chain. Contains the spending transaction and the block it was confirmed in. util::Unexpected{error} if something unexpected happened (i.e. disk or deserialization error).

Parameters

NameDescription
txo [in]The outpoint to search for.