Decode a small integer opcode, returning an integer
(self)
| 54 | return CScriptOp(OP_1 + n-1) |
| 55 | |
| 56 | def decode_op_n(self): |
| 57 | """Decode a small integer opcode, returning an integer""" |
| 58 | if self == OP_0: |
| 59 | return 0 |
| 60 | |
| 61 | if not (self == OP_0 or OP_1 <= self <= OP_16): |
| 62 | raise ValueError('op %r is not an OP_N' % self) |
| 63 | |
| 64 | return int(self - OP_1+1) |
| 65 | |
| 66 | def is_small_int(self): |
| 67 | """Return true if the op pushes a small integer to the stack""" |
no outgoing calls
no test coverage detected