0

In Transaction.cpp, there is a function CAmount CTransaction::GetValueOut() const. In Coins.cpp, there is a function CAmount CCoinsViewCache::GetValueIn(const CTransaction& tx) const. My understand the GetValueIn() is calculater all vin value for a Tx. But what the GetValueOut() calculate - all vout for a Tx?

1

But what the GetValueOut() calculate - all vout for a Tx?

Yes, it calculates the total value of all the outputs in the transaction. It also makes sure that the value is not out of range of the total supply of Bitcoin (21M).

  • JBaczuk, thank you so much for all your help. – yrm23 Sep 20 '18 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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