| 264 | } |
| 265 | |
| 266 | bool CScript::IsPushOnly(const_iterator pc) const |
| 267 | { |
| 268 | while (pc < end()) |
| 269 | { |
| 270 | opcodetype opcode; |
| 271 | if (!GetOp(pc, opcode)) |
| 272 | return false; |
| 273 | // Note that IsPushOnly() *does* consider OP_RESERVED to be a |
| 274 | // push-type opcode, however execution of OP_RESERVED fails, so |
| 275 | // it's not relevant to P2SH/BIP62 as the scriptSig would fail prior to |
| 276 | // the P2SH special validation code being executed. |
| 277 | if (opcode > OP_16) |
| 278 | return false; |
| 279 | } |
| 280 | return true; |
| 281 | } |
| 282 | |
| 283 | bool CScript::IsPushOnly() const |
| 284 | { |