mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Add IsPushOnly(const_iterator pc)
Allows IsPushOnly() to be applied to just part of the script for OP_RETURN outputs.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user