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
A
for which its only transactionT1
was 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 transactionT1
inT2
?I have an account
B
which so far only received 1 BTC from a transactionT1
and I want to spend the 1 BTC in a transactionT2
referencingT1
. But just before broadcastingT2
, a transactionT3
also referencingT1
credits my account with 1 BTC. WillT2
be accepted despiteT3
entering the blockchain beforeT2
?I have an account
C
to which someone will send 1 BTC tomorrow in a transactionT1
. Is it possible to "pre-spend" the 1 BTC in a transactionT2
without knowing the hash ofT1
? By pre-spend I mean that as soon as my account gets credited with the 1 BTC fromT1
, transactionT2
can immediately also enter the blockchain.