Decode a small integer opcode, returning an integer
(self)
| 62 | return CScriptOp(OP_1 + n-1) |
| 63 | |
| 64 | def decode_op_n(self): |
| 65 | """Decode a small integer opcode, returning an integer""" |
| 66 | if self == OP_0: |
| 67 | return 0 |
| 68 | |
| 69 | if not (self == OP_0 or OP_1 <= self <= OP_16): |
| 70 | raise ValueError('op %r is not an OP_N' % self) |
| 71 | |
| 72 | return int(self - OP_1+1) |
| 73 | |
| 74 | def is_small_int(self): |
| 75 | """Return true if the op pushes a small integer to the stack""" |
no outgoing calls