diff options
author | Peter Todd <pete@petertodd.org> | 2016-01-03 20:39:05 -0800 |
---|---|---|
committer | Peter Todd <pete@petertodd.org> | 2016-01-03 20:39:05 -0800 |
commit | fd836153d5c99073b290edd74c3507a00231885d (patch) | |
tree | 4838c57b04bea92e744668516e34f45c19a6cdb2 /src/main.cpp | |
parent | be9a9a3d2253ceccf123572b97a890c489a5a9be (diff) |
Improve CheckInputs() comment about sig verification
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 a43eef07b5..60e96bbf16 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1631,9 +1631,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; |