| 230 | } |
| 231 | |
| 232 | bool CScript::IsPushOnly(const_iterator pc) const |
| 233 | { |
| 234 | while (pc < end()) |
| 235 | { |
| 236 | opcodetype opcode; |
| 237 | if (!GetOp(pc, opcode)) |
| 238 | return false; |
| 239 | // Note that IsPushOnly() *does* consider OP_RESERVED to be a |
| 240 | // push-type opcode, however execution of OP_RESERVED fails, so |
| 241 | // it's not relevant to P2SH/BIP62 as the scriptSig would fail prior to |
| 242 | // the P2SH special validation code being executed. |
| 243 | if (opcode > OP_16) |
| 244 | return false; |
| 245 | } |
| 246 | return true; |
| 247 | } |
| 248 | |
| 249 | bool CScript::IsPushOnly() const |
| 250 | { |
no outgoing calls