mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 02:11:24 +02:00
net: make CaptureMessage() mockable
Rename `CaptureMessage()` to `CaptureMessageToFile()` and introduce a `std::function` variable called `CaptureMessage` whose value can be changed by unit tests, should they need to inspect message contents.
This commit is contained in:
@ -20,7 +20,7 @@ LENGTH_SIZE = 4
|
||||
MSGTYPE_SIZE = 12
|
||||
|
||||
def mini_parser(dat_file):
|
||||
"""Parse a data file created by CaptureMessage.
|
||||
"""Parse a data file created by CaptureMessageToFile.
|
||||
|
||||
From the data file we'll only check the structure.
|
||||
|
||||
|
Reference in New Issue
Block a user