diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -564,7 +564,7 @@ // For now, don't change mocktime if we're in the middle of validation, as // this could have an effect on mempool time-based eviction, as well as - // IsCurrentForFeeEstimation() and IsInitialBlockDownload(). + // IsInitialBlockDownload(). // TODO: figure out the right way to synchronize around mocktime, and // ensure all callsites of GetTime() are accessing this safely. LOCK(cs_main); 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