I am unable to read the p2p messages saved in msgs_sent.dat and msgs_recv.dat files.
Steps to reproduce:
- Run
bitcoindwithcapturemessages=1 - Wait for a few minutes, ensure there are some peers and corresponding directories created in
~/.bitcoin/message_capture - Run message capture python script with:
python message-capture-parser.py -o out.json ~/.bitcoin/message_capture/<IP_ADDRESS>_<PORT>/msgs_sent.dat
I am getting this error for sent/recv dat files of all peers:
python message-capture-parser.py -o out.json /home/test/.bitcoin/signet/message_capture/95.217.184.148_38333/msgs_sent.dat
[ ###################################################################################################################### ] 92%Traceback (most recent call last):
File "/home/test/Downloads/bitcoin/contrib/message-capture/message-capture-parser.py", line 215, in <module>
main()
File "/home/test/Downloads/bitcoin/contrib/message-capture/message-capture-parser.py", line 200, in main
process_file(str(capture), messages, "recv" in capture.stem, progress_bar)
File "/home/test/Downloads/bitcoin/contrib/message-capture/message-capture-parser.py", line 160, in process_file
msg_dict["body"] = to_jsonable(msg)
File "/home/test/Downloads/bitcoin/contrib/message-capture/message-capture-parser.py", line 83, in to_jsonable
assert all(isinstance(a, int) for a in val)
AssertionError
Message parsing script: https://github.com/bitcoin/bitcoin/blob/master/contrib/message-capture/message-capture-parser.py Doc: https://github.com/bitcoin/bitcoin/blob/master/contrib/message-capture/message-capture-docs.md