Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 478 Lines • ▼ Show 20 Lines | if (!tx.IsCoinBase()) { | ||||
"first tx is not coinbase"); | "first tx is not coinbase"); | ||||
} | } | ||||
if (!CheckTransactionCommon(tx, state, fCheckDuplicateInputs)) { | if (!CheckTransactionCommon(tx, state, fCheckDuplicateInputs)) { | ||||
// CheckTransactionCommon fill in the state. | // CheckTransactionCommon fill in the state. | ||||
return false; | return false; | ||||
} | } | ||||
if (tx.vin[0].scriptSig.size() < 2 || tx.vin[0].scriptSig.size() > 100) { | if (tx.vin[0].scriptSig.size() < 2 || | ||||
tx.vin[0].scriptSig.size() > MAX_COINBASE_SCRIPTSIG_SIZE) { | |||||
return state.DoS(100, false, REJECT_INVALID, "bad-cb-length"); | return state.DoS(100, false, REJECT_INVALID, "bad-cb-length"); | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
bool CheckRegularTransaction(const CTransaction &tx, CValidationState &state, | bool CheckRegularTransaction(const CTransaction &tx, CValidationState &state, | ||||
bool fCheckDuplicateInputs) { | bool fCheckDuplicateInputs) { | ||||
▲ Show 20 Lines • Show All 5,046 Lines • Show Last 20 Lines |