Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2)

This commit is contained in:
Pieter Wuille
2014-10-08 16:29:45 -07:00
parent 65e4e8427d
commit d752ba86c1
8 changed files with 61 additions and 4 deletions

View File

@@ -980,6 +980,10 @@ bool SignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vec
bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker)
{
if ((flags & SCRIPT_VERIFY_SIGPUSHONLY) != 0 && !scriptSig.IsPushOnly()) {
return false;
}
vector<vector<unsigned char> > stack, stackCopy;
if (!EvalScript(stack, scriptSig, flags, checker))
return false;