diff options
| author | Pieter Wuille <[email protected]> | 2014-10-08 16:29:45 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2014-10-25 03:03:16 -0700 |
| commit | d752ba86c1872f64a4641cf77008826d32bde65f (patch) | |
| tree | 07728ee7eee5a8dacc3d31496ef4b9b204f9f06e /src/script/interpreter.cpp | |
| parent | Merge pull request #5093 (diff) | |
| download | discoin-d752ba86c1872f64a4641cf77008826d32bde65f.tar.xz discoin-d752ba86c1872f64a4641cf77008826d32bde65f.zip | |
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 cd73b8821..e463de8cc 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; |