Changeset View
Changeset View
Standalone View
Standalone View
src/script/script.cpp
Show First 20 Lines • Show All 556 Lines • ▼ Show 20 Lines | if (opcode <= OP_PUSHDATA4) { | ||||
pvchRet->assign(pc, pc + nSize); | pvchRet->assign(pc, pc + nSize); | ||||
} | } | ||||
pc += nSize; | pc += nSize; | ||||
} | } | ||||
opcodeRet = static_cast<opcodetype>(opcode); | opcodeRet = static_cast<opcodetype>(opcode); | ||||
return true; | return true; | ||||
} | } | ||||
bool CScript::HasValidOps() const { | |||||
CScript::const_iterator it = begin(); | |||||
while (it < end()) { | |||||
opcodetype opcode; | |||||
std::vector<uint8_t> item; | |||||
if (!GetOp(it, opcode, item) || opcode > MAX_OPCODE || | |||||
item.size() > MAX_SCRIPT_ELEMENT_SIZE) { | |||||
return false; | |||||
} | |||||
} | |||||
return true; | |||||
} |