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:
parent
cf6cf56a68
commit
6962f1d2f0
|
@ -223,9 +223,8 @@ bool CScript::IsPayToScriptHash() const
|
||||||
(*this)[22] == OP_EQUAL);
|
(*this)[22] == OP_EQUAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CScript::IsPushOnly() const
|
bool CScript::IsPushOnly(const_iterator pc) const
|
||||||
{
|
{
|
||||||
const_iterator pc = begin();
|
|
||||||
while (pc < end())
|
while (pc < end())
|
||||||
{
|
{
|
||||||
opcodetype opcode;
|
opcodetype opcode;
|
||||||
|
@ -241,6 +240,11 @@ bool CScript::IsPushOnly() const
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CScript::IsPushOnly() const
|
||||||
|
{
|
||||||
|
return this->IsPushOnly(begin());
|
||||||
|
}
|
||||||
|
|
||||||
// insightexplorer
|
// insightexplorer
|
||||||
CScript::ScriptType CScript::GetType() const
|
CScript::ScriptType CScript::GetType() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -579,6 +579,7 @@ public:
|
||||||
uint160 AddressHash() const;
|
uint160 AddressHash() const;
|
||||||
|
|
||||||
/** Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical). */
|
/** Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical). */
|
||||||
|
bool IsPushOnly(const_iterator pc) const;
|
||||||
bool IsPushOnly() const;
|
bool IsPushOnly() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue