0

I guess this is called Circular spending.

Why is it required in the bitcoin protocol?

1 Answers1

1

Because on the lowest level of bitcoin protocol there is no accounts. There are scripts inside transaction. The most common script says: show me public key, I will compute Hash160 of it, compare with given Hash160, and if they are equal, I will check signature.

Let imagine, transaction contains single output with 1 bitcoin. Script contains Hash160 (which we treat as account). There is no way to spent part of bitcoin. We have to spent entire output, which is equal to 1 BTC in our case. Transactions, like blocks, form some kind of chain.

Zergatul
  • 958
  • 4
  • 11
  • thanks for the answer! if you can share any documentation about this, that wud b very helpful – Lakshay Dulani Aug 17 '17 at 10:42
  • You can use official wiki: https://en.bitcoin.it/wiki/Protocol_documentation#Transaction_Verification https://en.bitcoin.it/wiki/Script – Zergatul Aug 17 '17 at 11:29