Decode a small integer opcode, returning an integer
(self)
| 81 | return CScriptOp(OP_1 + n - 1) |
| 82 | |
| 83 | def decode_op_n(self): |
| 84 | """Decode a small integer opcode, returning an integer""" |
| 85 | if self == OP_0: |
| 86 | return 0 |
| 87 | |
| 88 | if not (self == OP_0 or OP_1 <= self <= OP_16): |
| 89 | raise ValueError('op %r is not an OP_N' % self) |
| 90 | |
| 91 | return int(self - OP_1 + 1) |
| 92 | |
| 93 | def is_small_int(self): |
| 94 | """Return true if the op pushes a small integer to the stack""" |
no outgoing calls
no test coverage detected