diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2014-10-08 16:29:45 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2014-10-25 03:03:16 -0700 |
commit | d752ba86c1872f64a4641cf77008826d32bde65f (patch) | |
tree | 07728ee7eee5a8dacc3d31496ef4b9b204f9f06e /src/script/interpreter.cpp | |
parent | 65e4e8427d900b27f579dc12af6c74b3ec628286 (diff) |
Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2)
Diffstat (limited to 'src/script/interpreter.cpp')
-rw-r--r-- | src/script/interpreter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index cd73b88210..e463de8cc2 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -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; |