aboutsummaryrefslogtreecommitdiff
path: root/src/script/script.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/script.cpp')
-rw-r--r--src/script/script.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/script/script.cpp b/src/script/script.cpp
index 58dbade0e2..9a0c067a33 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());
+}