aboutsummaryrefslogtreecommitdiff
path: root/src/net_types.cpp
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-05-18 19:08:44 +0200
committerMacroFake <falke.marco@gmail.com>2022-05-18 19:08:48 +0200
commite016c00e98b8e460c965cab050cb08a4f1a1d6f1 (patch)
tree152bd7949e494b946ad44861bbcb8bbd318ed258 /src/net_types.cpp
parent002411dc53753b52fef645484258e8baf41585a1 (diff)
parent5dc6d9207778c51c10c16fac4b3663bc7905bafc (diff)
downloadbitcoin-e016c00e98b8e460c965cab050cb08a4f1a1d6f1.tar.xz
Merge bitcoin/bitcoin#25126: test: add BIP157 message parsing support (via MESSAGEMAP)
5dc6d9207778c51c10c16fac4b3663bc7905bafc test: make BIP157 messages default-constructible (MESSAGEMAP compatibility) (Sebastian Falbesoner) 71e4cfefe765c58937b3fd3125782ca8407315d2 test: p2p: add missing BIP157 message types to MESSAGEMAP (Sebastian Falbesoner) Pull request description: The script [message-capture-parser.py](https://github.com/bitcoin/bitcoin/blob/master/contrib/message-capture/message-capture-parser.py) currently doesn't support parsing the BIP157 messages `getcfilters`, `getcfheaders` and `getcfcheckpt`, e.g. ``` $ ./contrib/message-capture/message-capture-parser.py msgs_recv.dat ... WARNING - Unrecognized message type b'getcfcheckpt' in /home/thestack/bitcoin/msgs_recv.dat ... ``` This PR fixes this by adding the missing message type mappings to the [`MESSAGEMAP`](https://github.com/bitcoin/bitcoin/blob/225e5b57b2ee2bc1acd7f09c89ccccc15ef8c85f/test/functional/test_framework/p2p.py#L95-L127) in the test framework and add default-constructors for the corresponding `msg_`... classes. Without the second commit, the following error message would occur: ``` File "/home/thestack/bitcoin/./contrib/message-capture/message-capture-parser.py", line 141, in process_file msg = MESSAGEMAP[msgtype]() TypeError: __init__() missing 2 required positional arguments: 'filter_type' and 'stop_hash' ``` ACKs for top commit: dunxen: tACK [5dc6d92](https://github.com/bitcoin/bitcoin/pull/25126/commits/5dc6d9207778c51c10c16fac4b3663bc7905bafc) Tree-SHA512: d656c4d38a856373f01d7c293ae7d2b27378a9fc248048ebf2a64725ef8b498b3ddf4f420704abdb20d0c68ca548f1777602c5e73b66821a20c97ae618f1d63f
Diffstat (limited to 'src/net_types.cpp')
0 files changed, 0 insertions, 0 deletions