<p>There’s functionally no distinction between an output which doesn’t exist, and one which hasn’t existed from the perspective of validation. The node never needs to consider this so by default it stores no information about it. </p>

CC BY-SA 4.0
2019-11-29T13:33:57.787Z
2019-11-29T13:33:57.787Z
Claris
<p>Using bitcoin's RPC and <code>txindex=0</code> is it possible to tell the difference between an existing output being already spent and a non existing transaction output (or transaction id)? Looking at <code>gettxout</code> it's not enough as it would return empty data in both scenarios.</p>

<json-rpc><txindex>
Non indexing bitcoin and output lookup
Andrea Raspitzu
# Non indexing bitcoin and output lookup

(Asked by: username_0 on 2019-11-29)

Using bitcoin's RPC and `txindex=0` is it possible to tell the difference between an existing output being already spent and a non existing transaction output (or transaction id)? Looking at `gettxout` it's not enough as it would return empty data in both scenarios.

**Tags:** json-rpc, txindex


---

## 1 answers

### Answer by username_1 on 2019-11-29. Score: 3 | Accepted answer

There’s functionally no distinction between an output which doesn’t exist, and one which hasn’t existed from the perspective of validation. The node never needs to consider this so by default it stores no information about it.


---

