| 298 | } |
| 299 | |
| 300 | bool CScript::HasValidOps() const |
| 301 | { |
| 302 | CScript::const_iterator it = begin(); |
| 303 | while (it < end()) { |
| 304 | opcodetype opcode; |
| 305 | std::vector<unsigned char> item; |
| 306 | if (!GetOp(it, opcode, item) || opcode > MAX_OPCODE || item.size() > MAX_SCRIPT_ELEMENT_SIZE) { |
| 307 | return false; |
| 308 | } |
| 309 | } |
| 310 | return true; |
| 311 | } |
| 312 | |
| 313 | bool GetScriptOp(CScriptBase::const_iterator& pc, CScriptBase::const_iterator end, opcodetype& opcodeRet, std::vector<unsigned char>* pvchRet) |
| 314 | { |