user15073: Using an rpc client (e.g. bitcoin-cli), for a given transaction and index of an output of it, how can I tell if the output is currently an utxo, or if it has already been spent?
In the latter case, I'd also want to know the transaction which spent it.
I looked at the gettxout command, but it isn't clear to me how to extract the answer from the data it returns.
I'm running a full node with txindex=1.

user208: If gettxout returns something, the output is unspent. If it returns nothing, the output either never existed or is spent.
You do not need -txindex for this.

15073: <p>Using an rpc client (e.g. <code>bitcoin-cli</code>), for a given transaction and index of an output of it, how can I tell if the output is currently an utxo, or if it has already been spent?</p>

<p>In the latter case, I'd also want to know the transaction which spent it.</p>

<p>I looked at the <code>gettxout</code> command, but it isn't clear to me how to extract the answer from the data it returns.</p>

<p>I'm running a full node with txindex=1.</p>
 208: <p>If <code>gettxout</code> returns something, the output is unspent. If it returns nothing, the output either never existed or is spent.</p>

<p>You do not need <code>-txindex</code> for this.</p>
