From f33cd8869dd5d8a805280ed913b059d66da2e5c2 Mon Sep 17 00:00:00 2001 From: brunoerg Date: Mon, 7 Aug 2023 17:57:18 -0300 Subject: [PATCH] QA: p2p_invalid_messages: Check misbehaving with noban,out whitelisting Github-Pull: #27114 Rebased-From: 1bae3b2ee6cb96c12fd7810c9362cfb7bdc165ad (partial) --- test/functional/p2p_invalid_messages.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py index 2fb88b828f..809dee8f86 100755 --- a/test/functional/p2p_invalid_messages.py +++ b/test/functional/p2p_invalid_messages.py @@ -285,6 +285,13 @@ class InvalidMessagesTest(BitcoinTestFramework): peer.send_message(msg_headers([blockheader])) peer.wait_for_disconnect() + self.log.info('Test same previous scenario but with a whitelisted (noban) outbound peer. ' + 'It should log as misbehaving but not cause a disconnection') + self.restart_node(0, extra_args=["-whitelist=noban,out@127.0.0.1"]) + ob_peer = self.nodes[0].add_outbound_p2p_connection(P2PInterface(), p2p_idx=5) + with self.nodes[0].assert_debug_log(['Misbehaving', 'header with invalid proof of work']): + ob_peer.send_and_ping(msg_headers([blockheader])) + def test_noncontinuous_headers_msg(self): self.log.info("Test headers message with non-continuous headers sequence is logged as misbehaving") block_hashes = self.generate(self.nodes[0], 10)