| 211 | } |
| 212 | |
| 213 | bool CScript::IsPushOnly() const |
| 214 | { |
| 215 | const_iterator pc = begin(); |
| 216 | while (pc < end()) |
| 217 | { |
| 218 | opcodetype opcode; |
| 219 | if (!GetOp(pc, opcode)) |
| 220 | return false; |
| 221 | // Note that IsPushOnly() *does* consider OP_RESERVED to be a |
| 222 | // push-type opcode, however execution of OP_RESERVED fails, so |
| 223 | // it's not relevant to P2SH/BIP62 as the scriptSig would fail prior to |
| 224 | // the P2SH special validation code being executed. |
| 225 | if (opcode > OP_16) |
| 226 | return false; |
| 227 | } |
| 228 | return true; |
| 229 | } |
| 230 | |
| 231 | bool CScript::IsCommitment(const std::vector<unsigned char> &data) const { |
| 232 | // To ensure we have an immediate push, we limit the commitment size to 64 |
no outgoing calls