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

Need help to recover blpckchain.info wallet, my wife forgot her password and the brute force with btcrecover is not catching the password

When downloading the blockchain my application is become unusable, is there an issue with my code or am I using the BitcoinJ library incorrectly?

Mistakenly sent BTC from my personal wallet back to one of the exchange wallet addresses that I had received BTC from before - help recovering!