0

At first I believed the coin amount of vin just based on what the send thinking. but after read some source code, it seems the coin amount of vin calculated from vout. Is anyone clear about this and please explain how the determination process is in source code. Thanks.

1 Answer 1

1

it seems the coin amount of vin calculated from vout.

It is. vin just references a vout from a previous transaction. Each output (vout) are referenced with the txid and an index (e.g. 0 or 1, because there can be multiple outputs in the same tx).

For more information about how transaction inputs and outputs work, see In getrawtransaction, what is the vout integer in the vin list?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.