| 81 | CTransaction::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 | |
| 83 | CAmount 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 | |
| 94 | unsigned int CTransaction::GetTotalSize() const |
| 95 | { |
no test coverage detected