| 246 | } |
| 247 | |
| 248 | bool CScript::IsPushOnly(const_iterator pc) const |
| 249 | { |
| 250 | while (pc < end()) |
| 251 | { |
| 252 | opcodetype opcode; |
| 253 | if (!GetOp(pc, opcode)) |
| 254 | return false; |
| 255 | // Note that IsPushOnly() *does* consider OP_RESERVED to be a |
| 256 | // push-type opcode, however execution of OP_RESERVED fails, so |
| 257 | // it's not relevant to P2SH/BIP62 as the scriptSig would fail prior to |
| 258 | // the P2SH special validation code being executed. |
| 259 | if (opcode > OP_16) |
| 260 | return false; |
| 261 | } |
| 262 | return true; |
| 263 | } |
| 264 | |
| 265 | bool CScript::IsPushOnly() const |
| 266 | { |