diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-02-27 15:47:27 -0500 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2012-02-27 15:47:27 -0500 |
commit | 21503e4556f1dba968bb6ff611cc3d0702993d61 (patch) | |
tree | 174d64b2bd90bcc4bd4c25186c721dd56412aec2 | |
parent | 46aa2a6bdd5ec512dd2e364b298e6e73c3e61354 (diff) | |
parent | db9f2e011732d5c04728196e29e0f0a029a8ea4d (diff) |
Merge branch 'nodosbip16' of https://github.com/sipa/bitcoin
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index a7bb71f011..168e68c813 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1128,7 +1128,14 @@ bool CTransaction::ConnectInputs(MapPrevTx inputs, { // Verify signature if (!VerifySignature(txPrev, *this, i, fStrictPayToScriptHash, 0)) + { + // only during transition phase for P2SH: do not invoke anti-DoS code for + // potentially old clients relaying bad P2SH transactions + if (fStrictPayToScriptHash && VerifySignature(txPrev, *this, i, false, 0)) + return error("ConnectInputs() : %s P2SH VerifySignature failed", GetHash().ToString().substr(0,10).c_str()); + return DoS(100,error("ConnectInputs() : %s VerifySignature failed", GetHash().ToString().substr(0,10).c_str())); + } } // Mark outpoints as spent |