X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fscript.h;fp=src%2Fscript.h;h=a99bcbc6bbfd8706c76591af6aa0bdf62360caee;hb=db034013fa0c48c71629f7e92353c01a7c2fc0f2;hp=e9afde81ee55bfb393f2d3b68f884f6c044cbc81;hpb=dd536eb94079058f0f2d780e99bea51bbaf4a90c;p=novacoin.git diff --git a/src/script.h b/src/script.h index e9afde8..a99bcbc 100644 --- a/src/script.h +++ b/src/script.h @@ -540,10 +540,8 @@ public: bool IsPayToScriptHash() const; - // Called by CTransaction::IsStandard and P2SH VerifyScript (which makes it consensus-critical). - bool IsPushOnly() const + bool IsPushOnly(const_iterator pc) const { - const_iterator pc = begin(); while (pc < end()) { opcodetype opcode; @@ -555,6 +553,12 @@ public: return true; } + // Called by CTransaction::IsStandard and P2SH VerifyScript (which makes it consensus-critical). + bool IsPushOnly() const + { + return this->IsPushOnly(begin()); + } + // Called by CTransaction::IsStandard. bool HasCanonicalPushes() const;