mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-03 09:23:01 +01:00
Add capture parser
This commit adds contrib/message-capture/message-capture-parser.py, a python script to be used alongside -capturemessages to parse the captured messages. It is complete with arguments and will parse any file given, sorting the messages in the files when creating the output. If an output file is specified with -o or --output, it will dump the messages in json format to that file, otherwise it will print to stdout. The small change to the unused msg_generic is to bring it in line with the other message classes, purely to avoid a bug in the future.
This commit is contained in:
@@ -1273,7 +1273,7 @@ class msg_block:
|
||||
# for cases where a user needs tighter control over what is sent over the wire
|
||||
# note that the user must supply the name of the msgtype, and the data
|
||||
class msg_generic:
|
||||
__slots__ = ("msgtype", "data")
|
||||
__slots__ = ("data")
|
||||
|
||||
def __init__(self, msgtype, data=None):
|
||||
self.msgtype = msgtype
|
||||
|
||||
Reference in New Issue
Block a user