From 3cb9d9c861710c0cff018bee90b1969193d3ed68 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Thu, 22 Jul 2021 18:23:21 +0200 Subject: 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. --- test/functional/p2p_message_capture.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/p2p_message_capture.py') diff --git a/test/functional/p2p_message_capture.py b/test/functional/p2p_message_capture.py index edde9a6ecf..0a7ae44de4 100755 --- a/test/functional/p2p_message_capture.py +++ b/test/functional/p2p_message_capture.py @@ -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. -- cgit v1.2.3