Changeset View
Changeset View
Standalone View
Standalone View
src/consensus/tx_verify.cpp
Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | for (const auto &txout : tx.vout) { | ||||
nValueOut += txout.nValue; | nValueOut += txout.nValue; | ||||
if (!MoneyRange(nValueOut)) { | if (!MoneyRange(nValueOut)) { | ||||
return state.DoS(100, false, REJECT_INVALID, | return state.DoS(100, false, REJECT_INVALID, | ||||
"bad-txns-txouttotal-toolarge"); | "bad-txns-txouttotal-toolarge"); | ||||
} | } | ||||
} | } | ||||
if (GetSigOpCountWithoutP2SH(tx, SCRIPT_VERIFY_CHECKDATASIG_SIGOPS) > | |||||
MAX_TX_SIGOPS_COUNT) { | |||||
return state.DoS(100, false, REJECT_INVALID, "bad-txn-sigops"); | |||||
} | |||||
return true; | return true; | ||||
} | } | ||||
bool CheckCoinbase(const CTransaction &tx, CValidationState &state) { | bool CheckCoinbase(const CTransaction &tx, CValidationState &state) { | ||||
if (!tx.IsCoinBase()) { | if (!tx.IsCoinBase()) { | ||||
return state.DoS(100, false, REJECT_INVALID, "bad-cb-missing", false, | return state.DoS(100, false, REJECT_INVALID, "bad-cb-missing", false, | ||||
"first tx is not coinbase"); | "first tx is not coinbase"); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |