| 362 | } |
| 363 | |
| 364 | bool CScript::IsPushOnly(const_iterator pc) const |
| 365 | { |
| 366 | while (pc < end()) |
| 367 | { |
| 368 | opcodetype opcode; |
| 369 | if (!GetOp(pc, opcode)) |
| 370 | return false; |
| 371 | // Note that IsPushOnly() *does* consider OP_RESERVED to be a |
| 372 | // push-type opcode, however execution of OP_RESERVED fails, so |
| 373 | // it's not relevant to P2SH/BIP62 as the scriptSig would fail prior to |
| 374 | // the P2SH special validation code being executed. |
| 375 | if (opcode > OP_16) |
| 376 | return false; |
| 377 | } |
| 378 | return true; |
| 379 | } |
| 380 | |
| 381 | bool CScript::IsPushOnly() const |
| 382 | { |