X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmain.cpp;h=168e68c8138301f5d9110abf4dd279b616a32df0;hb=21503e4556f1dba968bb6ff611cc3d0702993d61;hp=a7bb71f01126d597123e07189c3de3cb55f230ef;hpb=46aa2a6bdd5ec512dd2e364b298e6e73c3e61354;p=novacoin.git diff --git a/src/main.cpp b/src/main.cpp index a7bb71f..168e68c 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