Hi, I'm tryng to understand how transactions works and how they are organized. I understand the structure of a transaction, made up of a list of input and output
https://en.bitcoin.it/wiki/File:TxBinaryMap.png .
First 32 bytes of tx input are the hash of the previous transaction (and then 4 bytes of index), that is the transaction where there is the unspent output that I use as input in this transaction. This is the idea, right?
But in transaction structure there is no hash field, transaction are stored in blocks, and blocks have their own hash and the merkle root hash.
I can't understand how with transaction hash we can check if in that transaction there is an unspent output.
How can i find a transaction from its hash if it isn't stored anywhere?
I've also read that there is a structure that contains all utxo but i can't find detail about that.