aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2022-05-13 13:47:48 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2022-05-13 13:53:25 +0200
commit5dc6d9207778c51c10c16fac4b3663bc7905bafc (patch)
treebf6af9c9c4233a4b16a0427c4e2d9686ad72a6e4 /test
parent71e4cfefe765c58937b3fd3125782ca8407315d2 (diff)
downloadbitcoin-5dc6d9207778c51c10c16fac4b3663bc7905bafc.tar.xz
test: make BIP157 messages default-constructible (MESSAGEMAP compatibility)
In order to deserialize received or read messages via lookup in MESSAGEMAP (e.g.: `t = MESSAGEMAP[msgtype]()`), the messages must have a default constructor, i.e. there needs to be the possibility to initialize them with zero arguments.
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/test_framework/messages.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py
index f57b6e7494..aae44c0ac0 100755
--- a/test/functional/test_framework/messages.py
+++ b/test/functional/test_framework/messages.py
@@ -1672,7 +1672,7 @@ class msg_getcfilters:
__slots__ = ("filter_type", "start_height", "stop_hash")
msgtype = b"getcfilters"
- def __init__(self, filter_type, start_height, stop_hash):
+ def __init__(self, filter_type=None, start_height=None, stop_hash=None):
self.filter_type = filter_type
self.start_height = start_height
self.stop_hash = stop_hash
@@ -1722,7 +1722,7 @@ class msg_getcfheaders:
__slots__ = ("filter_type", "start_height", "stop_hash")
msgtype = b"getcfheaders"
- def __init__(self, filter_type, start_height, stop_hash):
+ def __init__(self, filter_type=None, start_height=None, stop_hash=None):
self.filter_type = filter_type
self.start_height = start_height
self.stop_hash = stop_hash
@@ -1775,7 +1775,7 @@ class msg_getcfcheckpt:
__slots__ = ("filter_type", "stop_hash")
msgtype = b"getcfcheckpt"
- def __init__(self, filter_type, stop_hash):
+ def __init__(self, filter_type=None, stop_hash=None):
self.filter_type = filter_type
self.stop_hash = stop_hash