diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1147,6 +1147,9 @@ std::vector *pvChecks) { assert(!tx.IsCoinBase()); + // This call does all the inexpensive checks on all the inputs. Only if ALL + // inputs pass do we perform expensive ECDSA signature checks. Helps prevent + // CPU exhaustion attacks. if (!Consensus::CheckTxInputs(tx, state, inputs, GetSpendHeight(inputs))) { return false; } @@ -1155,10 +1158,6 @@ pvChecks->reserve(tx.vin.size()); } - // The first loop above does all the inexpensive checks. Only if ALL inputs - // pass do we perform expensive ECDSA signature checks. Helps prevent CPU - // exhaustion attacks. - // Skip script verification when connecting blocks under the assumedvalid // block. Assuming the assumedvalid block is valid this is safe because // block merkle hashes are still computed and checked, of course, if an