Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/messages.py
Show First 20 Lines • Show All 2,089 Lines • ▼ Show 20 Lines | def serialize(self): | ||||
r = b"" | r = b"" | ||||
r += self.hello.serialize() | r += self.hello.serialize() | ||||
return r | return r | ||||
def __repr__(self): | def __repr__(self): | ||||
return "msg_avahello(response={})".format(repr(self.hello)) | return "msg_avahello(response={})".format(repr(self.hello)) | ||||
class msg_getavaaddr: | |||||
__slots__ = () | |||||
msgtype = b"getavaaddr" | |||||
def __init__(self): | |||||
pass | |||||
def deserialize(self, f): | |||||
pass | |||||
def serialize(self): | |||||
return b"" | |||||
def __repr__(self): | |||||
return "msg_getavaaddr()" | |||||
class TestFrameworkMessages(unittest.TestCase): | class TestFrameworkMessages(unittest.TestCase): | ||||
def test_legacy_avalanche_proof_serialization_round_trip(self): | def test_legacy_avalanche_proof_serialization_round_trip(self): | ||||
"""Verify that a LegacyAvalancheProof object is unchanged after a | """Verify that a LegacyAvalancheProof object is unchanged after a | ||||
round-trip of deserialization-serialization. | round-trip of deserialization-serialization. | ||||
""" | """ | ||||
proof_hex = ( | proof_hex = ( | ||||
"2a00000000000000fff053650000000021030b4c866585dd868a9d62348a9cd00" | "2a00000000000000fff053650000000021030b4c866585dd868a9d62348a9cd00" | ||||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |