Skip to content

Commit

Permalink
Migrate to test_large_inv() to Misbehaving logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Aug 10, 2021
1 parent d496b64 commit e58d5d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/functional/p2p_invalid_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ def test_command(self):
conn.sync_with_ping(timeout=1)
self.nodes[0].disconnect_p2ps()

def test_large_inv(self): # future: add Misbehaving value check, first invalid message raise it to 20, second to 40.
def test_large_inv(self):
conn = self.nodes[0].add_p2p_connection(P2PInterface())
with self.nodes[0].assert_debug_log(['ERROR: peer=5 message inv size() = 50001']):
with self.nodes[0].assert_debug_log(['Misbehaving', 'peer=5 (0 -> 20): message inv size() = 50001']):
msg = messages.msg_inv([messages.CInv(1, 1)] * 50001)
conn.send_and_ping(msg)
with self.nodes[0].assert_debug_log(['ERROR: peer=5 message getdata size() = 50001']):
with self.nodes[0].assert_debug_log(['Misbehaving', 'peer=5 (20 -> 40): message getdata size() = 50001']):
msg = messages.msg_getdata([messages.CInv(1, 1)] * 50001)
conn.send_and_ping(msg)
self.nodes[0].disconnect_p2ps()
Expand Down

0 comments on commit e58d5d0

Please sign in to comment.