mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-18 06:00:43 +02:00
QA: p2p_invalid_messages: Check misbehaving with noban,out whitelisting
Github-Pull: #27114 Rebased-From: 1bae3b2ee6cb96c12fd7810c9362cfb7bdc165ad (partial)
This commit is contained in:
parent
d3b817e76a
commit
f33cd8869d
@ -285,6 +285,13 @@ class InvalidMessagesTest(BitcoinTestFramework):
|
|||||||
peer.send_message(msg_headers([blockheader]))
|
peer.send_message(msg_headers([blockheader]))
|
||||||
peer.wait_for_disconnect()
|
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):
|
def test_noncontinuous_headers_msg(self):
|
||||||
self.log.info("Test headers message with non-continuous headers sequence is logged as misbehaving")
|
self.log.info("Test headers message with non-continuous headers sequence is logged as misbehaving")
|
||||||
block_hashes = self.generate(self.nodes[0], 10)
|
block_hashes = self.generate(self.nodes[0], 10)
|
||||||
|
Loading…
Reference in New Issue
Block a user