| 345 | } |
| 346 | |
| 347 | bool CScript::IsPushOnly(const_iterator pc) const |
| 348 | { |
| 349 | while (pc < end()) |
| 350 | { |
| 351 | opcodetype opcode; |
| 352 | if (!GetOp(pc, opcode)) |
| 353 | return false; |
| 354 | // Note that IsPushOnly() *does* consider OP_RESERVED to be a |
| 355 | // push-type opcode, however execution of OP_RESERVED fails, so |
| 356 | // it's not relevant to P2SH/BIP62 as the scriptSig would fail prior to |
| 357 | // the P2SH special validation code being executed. |
| 358 | if (opcode > OP_16) |
| 359 | return false; |
| 360 | } |
| 361 | return true; |
| 362 | } |
| 363 | |
| 364 | bool CScript::IsPushOnly() const |
| 365 | { |