MCPcopy Create free account
hub / github.com/LUX-Core/lux / IsPushOnly

Method IsPushOnly

src/script/script.cpp:364–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364bool CScript::IsPushOnly(const_iterator pc) const
365{
366 while (pc < end())
367 {
368 opcodetype opcode;
369 if (!GetOp(pc, opcode))
370 return false;
371 // Note that IsPushOnly() *does* consider OP_RESERVED to be a
372 // push-type opcode, however execution of OP_RESERVED fails, so
373 // it's not relevant to P2SH/BIP62 as the scriptSig would fail prior to
374 // the P2SH special validation code being executed.
375 if (opcode > OP_16)
376 return false;
377 }
378 return true;
379}
380
381bool CScript::IsPushOnly() const
382{

Callers 5

IsStandardTxFunction · 0.80
VerifyScriptFunction · 0.80
CountWitnessSigOpsFunction · 0.80
SolverFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 2

endFunction · 0.85
beginFunction · 0.85

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64