Permalink
Browse files

Merge pull request #1710 from sipa/dosp2sh

Remove P2SH transition code: P2SH violations may cause DoS trigger
  • Loading branch information...
2 parents bb790aa + 28982cc commit c13f5dbecf2bc22e81ad847f0cf4b1bf632cdd8d @sipa sipa committed Oct 29, 2012
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/main.cpp
View
@@ -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()));
- }
}
}
}

0 comments on commit c13f5db

Please sign in to comment.