Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/script.py
Show First 20 Lines • Show All 629 Lines • ▼ Show 20 Lines | class CScriptTruncatedPushDataError(CScriptInvalidError): | ||||
def __init__(self, msg, data): | def __init__(self, msg, data): | ||||
self.data = data | self.data = data | ||||
super(CScriptTruncatedPushDataError, self).__init__(msg) | super(CScriptTruncatedPushDataError, self).__init__(msg) | ||||
# This is used, eg, for blockchain heights in coinbase scripts (bip34) | # This is used, eg, for blockchain heights in coinbase scripts (bip34) | ||||
class CScriptNum(object): | class CScriptNum(): | ||||
def __init__(self, d=0): | def __init__(self, d=0): | ||||
self.value = d | self.value = d | ||||
@staticmethod | @staticmethod | ||||
def encode(obj): | def encode(obj): | ||||
r = bytearray(0) | r = bytearray(0) | ||||
if obj.value == 0: | if obj.value == 0: | ||||
return bytes(r) | return bytes(r) | ||||
▲ Show 20 Lines • Show All 323 Lines • Show Last 20 Lines |