diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-10-04 17:34:26 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-11-19 08:06:30 +0100 |
commit | fad68afcff731153d1c83f7f56c91ecbb264b59a (patch) | |
tree | d67c92218fa26d51f46776965ccbad98ac73f60d /test/functional/p2p_timeouts.py | |
parent | ea7926527ce36c05cacb99602b2b59579ff646e8 (diff) | |
download | bitcoin-fad68afcff731153d1c83f7f56c91ecbb264b59a.tar.xz |
p2p: Ignore non-version msgs before version msg
Sending a non-version message before the initial version message is peer
misbehavior. Though, it seems arbitrary and confusing to disconnect only
after exactly 100 non-version messages. So remove the Misbehaving and
instead rely on the existing disconnect-due-to-handshake-timeout logic.
Diffstat (limited to 'test/functional/p2p_timeouts.py')
-rwxr-xr-x | test/functional/p2p_timeouts.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/p2p_timeouts.py b/test/functional/p2p_timeouts.py index ce12ce26ce..47832b04bf 100755 --- a/test/functional/p2p_timeouts.py +++ b/test/functional/p2p_timeouts.py @@ -57,8 +57,10 @@ class TimeoutsTest(BitcoinTestFramework): assert no_version_node.is_connected assert no_send_node.is_connected - no_verack_node.send_message(msg_ping()) - no_version_node.send_message(msg_ping()) + with self.nodes[0].assert_debug_log(['Unsupported message "ping" prior to verack from peer=0']): + no_verack_node.send_message(msg_ping()) + with self.nodes[0].assert_debug_log(['non-version message before version handshake. Message "ping" from peer=1']): + no_version_node.send_message(msg_ping()) sleep(1) |