How is the previous transaction found efficiently?

3

1

When a new block is being created, all the transactions must be verified. In order to do that, the outputs of the previous transaction must be found in the blockchain.

But the new transaction only refers to the previous transaction by a hash. How is that transaction located without searching the whole blockchain?

RentFree

Posted 2013-05-05T12:55:49.170

Reputation: 2 391

Answers

2

Bitcoin clients maintain a list of the current unspent outputs in a hash table.

lurf jurv

Posted 2013-05-05T12:55:49.170

Reputation: 2 516