Changeset View
Changeset View
Standalone View
Standalone View
src/script/script.cpp
Show First 20 Lines • Show All 477 Lines • ▼ Show 20 Lines | while (pc < end()) { | ||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
bool CScript::IsPushOnly() const { | bool CScript::IsPushOnly() const { | ||||
return this->IsPushOnly(begin()); | return this->IsPushOnly(begin()); | ||||
} | } | ||||
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; | |||||
} |