MCPcopy Create free account
hub / github.com/ElementsProject/elements / CProof

Class CProof

test/functional/test_framework/messages.py:942–971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

940
941
942class 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
973class DynaFedParamEntry:
974 __slots__ = ("m_serialize_type", "m_signblockscript", "m_signblock_witness_limit", "m_fedpeg_program", "m_fedpegscript", "m_extension_space", "m_elided_root")

Callers 4

run_testMethod · 0.90
run_testMethod · 0.90
create_blockFunction · 0.70
set_nullMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected