user93321: I'm searching the function that validates a transaction according to Protocol rules - "tx" messages especially step 14 sum(vin) > sum(vout).
I found this interesting function CheckTransaction(const CTransaction& tx, CValidationState &state) but it does not validate step 14, right?
Where is this check for step 14?

user12983: https://github.com/bitcoin/bitcoin/search?q=bad-txns-in-belowout&unscoped_q=bad-txns-in-belowout
const CAmount value_out = tx.GetValueOut();
if (nValueIn < value_out) {
    return state.DoS(100, false, REJECT_INVALID, "bad-txns-in-belowout", false,
        strprintf("value in (%s) < value out (%s)", FormatMoney(nValueIn), FormatMoney(value_out)));
}


93321: <p>I'm searching the function that validates a transaction according to <a href="https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages" rel="nofollow noreferrer">Protocol rules - "tx" messages</a> especially step 14 <code>sum(vin) &gt; sum(vout)</code>.</p>

<p>I found <a href="https://github.com/bitcoin/bitcoin/blob/f7a21dae5dbf71d5bc00485215e84e6f2b309d0a/src/main.cpp#L939" rel="nofollow noreferrer">this</a> interesting function <code>CheckTransaction(const CTransaction&amp; tx, CValidationState &amp;state)</code> but it does not validate step 14, right?</p>

<p>Where is this check for step 14?</p>
 12983: <p><a href="https://github.com/bitcoin/bitcoin/search?q=bad-txns-in-belowout&amp;unscoped_q=bad-txns-in-belowout" rel="noreferrer">https://github.com/bitcoin/bitcoin/search?q=bad-txns-in-belowout&amp;unscoped_q=bad-txns-in-belowout</a></p>

<pre><code>const CAmount value_out = tx.GetValueOut();
if (nValueIn &lt; value_out) {
    return state.DoS(100, false, REJECT_INVALID, "bad-txns-in-belowout", false,
        strprintf("value in (%s) &lt; value out (%s)", FormatMoney(nValueIn), FormatMoney(value_out)));
}
</code></pre>
