diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-10-01 19:53:24 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-10-01 21:28:45 +0200 |
| commit | cd78c2a421ae5aa1773c8fb84dadc2c61a01e5e8 (patch) | |
| tree | 391ecd1cf9ea432a1558ae2e70d9a1fbb91d5dd3 /src/script/script.cpp | |
| parent | Merge pull request #6732 (diff) | |
| parent | Accept any sequence of PUSHDATAs in OP_RETURN outputs (diff) | |
| download | discoin-cd78c2a421ae5aa1773c8fb84dadc2c61a01e5e8.tar.xz discoin-cd78c2a421ae5aa1773c8fb84dadc2c61a01e5e8.zip | |
Merge pull request #6424
da894ab Accept any sequence of PUSHDATAs in OP_RETURN outputs (Peter Todd)
5d8709c Add IsPushOnly(const_iterator pc) (Peter Todd)
6a07eb6 Make TX_SCRIPTHASH clear vSolutionsRet first (Peter Todd)
Diffstat (limited to 'src/script/script.cpp')
| -rw-r--r-- | src/script/script.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/script/script.cpp b/src/script/script.cpp index 58dbade0e..9a0c067a3 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -144,7 +144,7 @@ const char* GetOpName(opcodetype opcode) case OP_INVALIDOPCODE : return "OP_INVALIDOPCODE"; // Note: - // The template matching params OP_SMALLDATA/etc are defined in opcodetype enum + // The template matching params OP_SMALLINTEGER/etc are defined in opcodetype enum // as kind of implementation hack, they are *NOT* real opcodes. If found in real // Script, just let the default: case deal with them. @@ -210,9 +210,8 @@ bool CScript::IsPayToScriptHash() const this->at(22) == OP_EQUAL); } -bool CScript::IsPushOnly() const +bool CScript::IsPushOnly(const_iterator pc) const { - const_iterator pc = begin(); while (pc < end()) { opcodetype opcode; @@ -227,3 +226,8 @@ bool CScript::IsPushOnly() const } return true; } + +bool CScript::IsPushOnly() const +{ + return this->IsPushOnly(begin()); +} |