MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / HasValidOps

Method HasValidOps

src/script/script.cpp:266–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266bool CScript::HasValidOps() const
267{
268 CScript::const_iterator it = begin();
269 while (it < end()) {
270 opcodetype opcode;
271 std::vector<unsigned char> item;
272 if (!GetOp(it, opcode, item) || opcode > MAX_OPCODE || item.size() > MAX_SCRIPT_ELEMENT_SIZE) {
273 return false;
274 }
275 }
276 return true;
277}
278
279bool GetScriptOp(CScriptBase::const_iterator& pc, CScriptBase::const_iterator end, opcodetype& opcodeRet, std::vector<unsigned char>* pvchRet)
280{

Callers 2

CheckTxScriptsSanityFunction · 0.80
BOOST_AUTO_TEST_CASEFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.64