MCPcopy Create free account
hub / github.com/LUX-Core/lux / decode_op_n

Method decode_op_n

test/functional/test_framework/script.py:66–74  ·  view source on GitHub ↗

Decode a small integer opcode, returning an integer

(self)

Source from the content-addressed store, hash-verified

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

Callers 2

__iter__Method · 0.95
GetSigOpCountMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected