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

Method HasValidOps

src/script/script.cpp:480–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478}
479
480bool CScript::HasValidOps() const {
481 CScript::const_iterator it = begin();
482 while (it < end()) {
483 opcodetype opcode;
484 std::vector<uint8_t> item;
485 if (!GetOp(it, opcode, item) || opcode > MAX_OPCODE ||
486 item.size() > MAX_SCRIPT_ELEMENT_SIZE) {
487 return false;
488 }
489 }
490 return true;
491}

Callers 4

BOOST_AUTO_TEST_CASEFunction · 0.80
FUZZ_TARGETFunction · 0.80
FUZZ_TARGET_INITFunction · 0.80
FUZZ_TARGET_INITFunction · 0.80

Calls 3

beginFunction · 0.85
endFunction · 0.85
sizeMethod · 0.45

Tested by 4

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