<p>After reviewing the structure of a transaction, I now understand what is meant by that statement.</p>

<p><a href="https://i.sstatic.net/6xpgr.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6xpgr.png" alt="enter image description here"></a></p>

<p>The input is the UTXO, and the output is the output of that UTXO. So when it says the output must exist and cannot already be spent, it's saying the output of the UTXO must exist and not already be spent.</p>

CC BY-SA 3.0
2016-09-03T01:15:01.257Z
2016-09-03T01:15:01.257Z
Snowman
<p>It says "<strong>referenced</strong> output", which means output of previous transaction. (The one you are spending.)</p>

CC BY-SA 3.0
2016-09-03T07:39:42.500Z
2016-09-03T07:39:42.500Z
Martin Habovštiak
<p>I'm reading through the <a href="http://chimera.labs.oreilly.com/books/1234000001802/ch08.html#tx_verification" rel="nofollow">Mastering Bitcoin</a> book and the section talking about what nodes check for to ensure a transaction is valid before accepting it refers to this:</p>

<blockquote>
  <p>Each node verifies every transaction against a long checklist of
  criteria: </p>
  
  <p>... </p>
  
  <p><strong>For each input, the referenced output must exist and
  cannot already be spent.</strong></p>
</blockquote>

<p>However, I'm not sure exactly what it means for "an output to exist". How can an output exist if I am creating it now with this transaction?</p>

<bitcoin-core><transactions><nodes><output><mastering-bitcoin>
Transaction validity clause: output must exist
Snowman
# Transaction validity clause: output must exist

(Asked by: username_0 on 2016-09-03)

I'm reading through the [Mastering Bitcoin](http://chimera.labs.oreilly.com/books/1234000001802/ch08.html#tx_verification) book and the section talking about what nodes check for to ensure a transaction is valid before accepting it refers to this:

> Each node verifies every transaction against a long checklist of
> criteria:
>
> ...
>
> **For each input, the referenced output must exist and
> cannot already be spent.**

However, I'm not sure exactly what it means for "an output to exist". How can an output exist if I am creating it now with this transaction?

**Tags:** bitcoin-core, transactions, nodes, output, mastering-bitcoin


---

## 2 answers

### Answer by username_0 on 2016-09-03. Score: 1

After reviewing the structure of a transaction, I now understand what is meant by that statement.

[![enter image description here](https://i.sstatic.net/6xpgr.png)](https://i.sstatic.net/6xpgr.png)

The input is the UTXO, and the output is the output of that UTXO. So when it says the output must exist and cannot already be spent, it's saying the output of the UTXO must exist and not already be spent.


---

### Answer by username_1 on 2016-09-03. Score: 1

It says "**referenced** output", which means output of previous transaction. (The one you are spending.)


---

