2

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?

6

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)));
}

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.