| 264 | } |
| 265 | |
| 266 | bool 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 | |
| 279 | bool GetScriptOp(CScriptBase::const_iterator& pc, CScriptBase::const_iterator end, opcodetype& opcodeRet, std::vector<unsigned char>* pvchRet) |
| 280 | { |