Skip to content
Bitcoin Roots

v30.3-roots.1 · Commit 3: [PATCH 03/68] feat(policy): preserve Roots relay and network controls on Core 30.3

test/functional/p2p_invalid_messages.py

Before: test/functional/p2p_invalid_messages.py · After: test/functional/p2p_invalid_messages.py

File metadata
index e629a5998d697e7b2c75c2c77a737baf3f4acd50..3dddf844c1989d7a72c65bee9fcea5747bf80bbd 100755

Download original patch · Release notes

Diff rows 1–13 of 13. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

test/functional/p2p_invalid_messages.py CHANGED
@@ -304,6 +304,13 @@ class InvalidMessagesTest(BitcoinTestFramework):
304
304
  peer.send_without_ping(msg_headers([blockheader]))
305
305
  peer.wait_for_disconnect()
306
306
 
307
+ self.log.info('Test same previous scenario but with a whitelisted (noban) outbound peer. '
308
+ 'It should log as misbehaving but not cause a disconnection')
309
+ self.restart_node(0, extra_args=["-whitelist=noban,out@127.0.0.1"])
310
+ ob_peer = self.nodes[0].add_outbound_p2p_connection(P2PInterface(), p2p_idx=5)
311
+ with self.nodes[0].assert_debug_log(['Misbehaving', 'header with invalid proof of work']):
312
+ ob_peer.send_and_ping(msg_headers([blockheader]))
313
+
307
314
  def test_noncontinuous_headers_msg(self):
308
315
  self.log.info("Test headers message with non-continuous headers sequence is logged as misbehaving")
309
316
  block_hashes = self.generate(self.nodes[0], 10)