aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-10-29 03:28:49 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2012-10-29 03:28:49 -0700
commitc13f5dbecf2bc22e81ad847f0cf4b1bf632cdd8d (patch)
tree279582e151108a5132278cf4f37b8644c482a58d
parentbb790aa24d4224717c1269cbc2f508eeefaacad1 (diff)
parent28982cc9dc07ef85862109439a61f3ff3409e749 (diff)
Merge pull request #1710 from sipa/dosp2sh
Remove P2SH transition code: P2SH violations may cause DoS trigger
-rw-r--r--src/main.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/main.cpp b/src/main.cpp
index b1fdc2ed52..43bd5dd472 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1382,14 +1382,8 @@ bool CTransaction::CheckInputs(CCoinsViewCache &inputs, enum CheckSig_mode csmod
const CCoins &coins = inputs.GetCoins(prevout.hash);
// Verify signature
- if (!VerifySignature(coins, *this, i, fStrictPayToScriptHash, fStrictEncodings, 0)) {
- // only during transition phase for P2SH: do not invoke anti-DoS code for
- // potentially old clients relaying bad P2SH transactions
- if (fStrictPayToScriptHash && VerifySignature(coins, *this, i, false, fStrictEncodings, 0))
- return error("CheckInputs() : %s P2SH VerifySignature failed", GetHash().ToString().substr(0,10).c_str());
-
+ if (!VerifySignature(coins, *this, i, fStrictPayToScriptHash, fStrictEncodings, 0))
return DoS(100,error("CheckInputs() : %s VerifySignature failed", GetHash().ToString().substr(0,10).c_str()));
- }
}
}
}