| 384 | } |
| 385 | |
| 386 | bool CScript::HasValidOps() const |
| 387 | { |
| 388 | CScript::const_iterator it = begin(); |
| 389 | while (it < end()) { |
| 390 | opcodetype opcode; |
| 391 | std::vector<unsigned char> item; |
| 392 | if (!GetOp(it, opcode, item) || opcode > MAX_OPCODE || item.size() > MAX_SCRIPT_ELEMENT_SIZE) { |
| 393 | return false; |
| 394 | } |
| 395 | } |
| 396 | return true; |
| 397 | } |
| 398 | |
| 399 | bool GetScriptOp(CScriptBase::const_iterator& pc, CScriptBase::const_iterator end, opcodetype& opcodeRet, std::vector<unsigned char>* pvchRet) |
| 400 | { |