From 23083856a551ca13e8b142791c296ecb25cc4e7f Mon Sep 17 00:00:00 2001 From: Jim Posen Date: Mon, 4 May 2020 14:10:18 -0400 Subject: [test] Add test for cfcheckpt --- test/functional/test_framework/messages.py | 49 ++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'test/functional/test_framework/messages.py') diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index 4855f62a8f..ef5ef49eaf 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -57,6 +57,8 @@ MSG_FILTERED_BLOCK = 3 MSG_WITNESS_FLAG = 1 << 30 MSG_TYPE_MASK = 0xffffffff >> 2 +FILTER_TYPE_BASIC = 0 + # Serialization/deserialization tools def sha256(s): return hashlib.new('sha256', s).digest() @@ -1512,3 +1514,50 @@ class msg_no_witness_blocktxn(msg_blocktxn): def serialize(self): return self.block_transactions.serialize(with_witness=False) + +class msg_getcfcheckpt: + __slots__ = ("filter_type", "stop_hash") + msgtype = b"getcfcheckpt" + + def __init__(self, filter_type, stop_hash): + self.filter_type = filter_type + self.stop_hash = stop_hash + + def deserialize(self, f): + self.filter_type = struct.unpack("