MCPcopy Create free account
hub / github.com/dogecoin/dogecoin / IsPushOnly

Method IsPushOnly

src/script/script.cpp:239–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239bool CScript::IsPushOnly(const_iterator pc) const
240{
241 while (pc < end())
242 {
243 opcodetype opcode;
244 if (!GetOp(pc, opcode))
245 return false;
246 // Note that IsPushOnly() *does* consider OP_RESERVED to be a
247 // push-type opcode, however execution of OP_RESERVED fails, so
248 // it's not relevant to P2SH/BIP62 as the scriptSig would fail prior to
249 // the P2SH special validation code being executed.
250 if (opcode > OP_16)
251 return false;
252 }
253 return true;
254}
255
256bool CScript::IsPushOnly() const
257{

Callers 5

BOOST_FOREACHFunction · 0.80
VerifyScriptFunction · 0.80
CountWitnessSigOpsFunction · 0.80
SolverFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls

no outgoing calls

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64