MCPcopy Create free account
hub / github.com/ElementsProject/elements / IsPushOnly

Method IsPushOnly

src/script/script.cpp:347–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347bool CScript::IsPushOnly(const_iterator pc) const
348{
349 while (pc < end())
350 {
351 opcodetype opcode;
352 if (!GetOp(pc, opcode))
353 return false;
354 // Note that IsPushOnly() *does* consider OP_RESERVED to be a
355 // push-type opcode, however execution of OP_RESERVED fails, so
356 // it's not relevant to P2SH/BIP62 as the scriptSig would fail prior to
357 // the P2SH special validation code being executed.
358 if (opcode > OP_16)
359 return false;
360 }
361 return true;
362}
363
364bool CScript::IsPushOnly() const
365{

Callers 8

IsStandardTxFunction · 0.80
VerifyScriptFunction · 0.80
CountWitnessSigOpsFunction · 0.80
SolverFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80
FUZZ_TARGETFunction · 0.80
FUZZ_TARGET_INITFunction · 0.80
FUZZ_TARGET_INITFunction · 0.80

Calls 2

endFunction · 0.85
beginFunction · 0.85

Tested by 4

BOOST_AUTO_TEST_CASEFunction · 0.64
FUZZ_TARGETFunction · 0.64
FUZZ_TARGET_INITFunction · 0.64
FUZZ_TARGET_INITFunction · 0.64