diff options
| author | Gavin Andresen <[email protected]> | 2012-02-27 15:47:27 -0500 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2012-02-27 15:47:27 -0500 |
| commit | 21503e4556f1dba968bb6ff611cc3d0702993d61 (patch) | |
| tree | 174d64b2bd90bcc4bd4c25186c721dd56412aec2 /src/main.cpp | |
| parent | Move BIP16 switchover time to April 1 (diff) | |
| parent | Do not invoke anti-DoS system for invalid BIP16 transactions (diff) | |
| download | discoin-21503e4556f1dba968bb6ff611cc3d0702993d61.tar.xz discoin-21503e4556f1dba968bb6ff611cc3d0702993d61.zip | |
Merge branch 'nodosbip16' of https://github.com/sipa/bitcoin
Diffstat (limited to 'src/main.cpp')
| -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 a7bb71f01..168e68c81 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 |