MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / GetValueOut

Method GetValueOut

src/primitives/transaction.cpp:83–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81CTransaction::CTransaction(CMutableTransaction&& tx) : vin(std::move(tx.vin)), vout(std::move(tx.vout)), nVersion(tx.nVersion), nLockTime(tx.nLockTime), hash{ComputeHash()}, m_witness_hash{ComputeWitnessHash()} {}
82
83CAmount CTransaction::GetValueOut() const
84{
85 CAmount nValueOut = 0;
86 for (const auto& tx_out : vout) {
87 nValueOut += tx_out.nValue;
88 if (!MoneyRange(tx_out.nValue) || !MoneyRange(nValueOut))
89 throw std::runtime_error(std::string(__func__) + ": value out of range");
90 }
91 return nValueOut;
92}
93
94unsigned int CTransaction::GetTotalSize() const
95{

Callers 7

ConnectBlockMethod · 0.80
gettransactionFunction · 0.80
CreateTransactionFunction · 0.80
GetAmountsMethod · 0.80
toHTMLMethod · 0.80
decomposeTransactionMethod · 0.80
CheckTxInputsMethod · 0.80

Calls 1

MoneyRangeFunction · 0.85

Tested by

no test coverage detected