How specifically is transaction history modeled in blockchain blocks?

How specifically is transaction history modeled in blockchain blocks?

I understand that each block on the Bitcoin blockchain contains a list of transactions, but let's assume (for the sake of this question) that the block in question contains only a single transaction--and that this particular transaction has a history of previous transactions (i.e., it was not a coinbase transaction). How would I figure out which block holds this single transaction's previous transaction(s)? I know that each transaction contains the hash of the previous transaction--but how do you find that hash without looking into every block on the blockchain? In other words, how can I quickly discern a transaction hash chain for a given transaction ID? Any links to explanations or previous questions would be appreciated--I tried searching and haven't seen anything that answers my question to my satisfaction.

Thank you.

https://ift.tt/2KMYpcB

Comments

Popular posts from this blog

sendrawtransaction and txn-mempool-conflict

couldn't connect to server: EOF reached (code 1)