MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / IsPushOnly

Method IsPushOnly

src/script/script.cpp:404–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404bool CScript::IsPushOnly(const_iterator pc) const {
405 while (pc < end()) {
406 opcodetype opcode;
407 if (!GetOp(pc, opcode)) {
408 return false;
409 }
410
411 // Note that IsPushOnly() *does* consider OP_RESERVED to be a push-type
412 // opcode, however execution of OP_RESERVED fails, so it's not relevant
413 // to P2SH/BIP62 as the scriptSig would fail prior to the P2SH special
414 // validation code being executed.
415 if (opcode > OP_16) {
416 return false;
417 }
418 }
419 return true;
420}
421
422bool CScript::IsPushOnly() const {
423 return this->IsPushOnly(begin());

Callers 9

IsStandardTxFunction · 0.80
VerifyScriptFunction · 0.80
SolverFunction · 0.80
StacksMethod · 0.80
RunMethod · 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