0
I'm confused about the inclusion of the hash of the previous transaction in a transaction. Is it mandatory? Should it be the hash of the last outbound transaction? What if an unexpected transaction messes up the linked list? I have written specific scenarios below for which I am unsure about the behaviour.
I have an account
Afor which its only transactionT1was receiving 1 BTC from some other account. If I want to spend my 1 BTC in a transactionT2, do I need to include the hash of the transactionT1inT2?I have an account
Bwhich so far only received 1 BTC from a transactionT1and I want to spend the 1 BTC in a transactionT2referencingT1. But just before broadcastingT2, a transactionT3also referencingT1credits my account with 1 BTC. WillT2be accepted despiteT3entering the blockchain beforeT2?I have an account
Cto which someone will send 1 BTC tomorrow in a transactionT1. Is it possible to "pre-spend" the 1 BTC in a transactionT2without knowing the hash ofT1? By pre-spend I mean that as soon as my account gets credited with the 1 BTC fromT1, transactionT2can immediately also enter the blockchain.
Aha, I see. So for example can I see on Blockchain.info the balance of an address down to the coin granularity? – Randomblue – 2014-01-12T14:29:49.657
If you click on a particular transaction, you can see which of its outputs are spent or not. In general, the view that these block explorer like sites present is misleading, as they interpret the data to make it look like a balance/ledger system. – Pieter Wuille – 2014-01-12T15:31:16.363