| 940 | |
| 941 | |
| 942 | class CProof: |
| 943 | __slots__ = ("challenge", "solution") |
| 944 | |
| 945 | # Default allows OP_TRUE blocks |
| 946 | def __init__(self, challenge=bytearray.fromhex('51'), solution=b""): |
| 947 | self.challenge = challenge |
| 948 | self.solution = solution |
| 949 | |
| 950 | def set_null(self): |
| 951 | self.challenge = b"" |
| 952 | self.solution = b"" |
| 953 | |
| 954 | def deserialize(self, f): |
| 955 | self.challenge = deser_string(f) |
| 956 | self.solution = deser_string(f) |
| 957 | |
| 958 | def serialize(self): |
| 959 | r = b"" |
| 960 | r += ser_string(self.challenge) |
| 961 | r += ser_string(self.solution) |
| 962 | return r |
| 963 | |
| 964 | def serialize_for_hash(self): |
| 965 | r = b"" |
| 966 | r += ser_string(self.challenge) |
| 967 | return r |
| 968 | |
| 969 | def __repr__(self): |
| 970 | return "CProof(challenge=%s solution=%s)" \ |
| 971 | % (self.challenge, self.solution) |
| 972 | |
| 973 | class DynaFedParamEntry: |
| 974 | __slots__ = ("m_serialize_type", "m_signblockscript", "m_signblock_witness_limit", "m_fedpeg_program", "m_fedpegscript", "m_extension_space", "m_elided_root") |
no outgoing calls
no test coverage detected