diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-01-19 13:23:20 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-01-19 13:23:32 +0100 |
commit | f9fd4c2884849bc667da3da8bf5f78f33dd01f1c (patch) | |
tree | 61a9e0056541cf7c2b8594c23603c708a3a0a7fc /src/main.cpp | |
parent | 3b43cad9d0596a94b6d9d85460a4c591c485bf63 (diff) | |
parent | fd836153d5c99073b290edd74c3507a00231885d (diff) |
Merge pull request #7281: Improve CheckInputs() comment about sig verification
fd83615 Improve CheckInputs() comment about sig verification (Peter Todd)
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index f5bf85e7c0..9870beecc7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1636,9 +1636,12 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi // Only if ALL inputs pass do we perform expensive ECDSA signature checks. // Helps prevent CPU exhaustion attacks. - // Skip ECDSA signature verification when connecting blocks - // before the last block chain checkpoint. This is safe because block merkle hashes are - // still computed and checked, and any change will be caught at the next checkpoint. + // Skip ECDSA signature verification when connecting blocks before the + // last block chain checkpoint. Assuming the checkpoints are valid this + // is safe because block merkle hashes are still computed and checked, + // and any change will be caught at the next checkpoint. Of course, if + // the checkpoint is for a chain that's invalid due to false scriptSigs + // this optimisation would allow an invalid chain to be accepted. if (fScriptChecks) { for (unsigned int i = 0; i < tx.vin.size(); i++) { const COutPoint &prevout = tx.vin[i].prevout; |