From 23288e78b94725d261c121a0452e38aebebdefa7 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 30 Mar 2024 00:06:05 +0100 Subject: [PATCH] only print warnings about protocol mismatches for farmer and harvester (#17801) only print warnings about protocol mismatches for farmer and harvester. In the future, maybe this should also include trusted wallets --- chia/server/ws_connection.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/chia/server/ws_connection.py b/chia/server/ws_connection.py index de8e63892c02..50b527ad4547 100644 --- a/chia/server/ws_connection.py +++ b/chia/server/ws_connection.py @@ -221,9 +221,13 @@ async def perform_handshake( if inbound_handshake.network_id != network_id: raise ProtocolError(Err.INCOMPATIBLE_NETWORK_ID) - if inbound_handshake.protocol_version != protocol_version[local_type]: + if ( + local_type in [NodeType.FARMER, NodeType.HARVESTER] + and inbound_handshake.protocol_version != protocol_version[local_type] + ): self.log.warning( f"protocol version mismatch: " + f"local_type={local_type} " f"incoming={inbound_handshake.protocol_version} " f"our={protocol_version[local_type]}" ) @@ -258,9 +262,15 @@ async def perform_handshake( remote_node_type = NodeType(inbound_handshake.node_type) - if inbound_handshake.protocol_version != protocol_version[remote_node_type]: + if ( + remote_node_type in [NodeType.FARMER, NodeType.HARVESTER] + and inbound_handshake.protocol_version != protocol_version[remote_node_type] + ): self.log.warning( - f"protocol version mismatch: incoming={inbound_handshake.protocol_version} our={protocol_version}" + f"protocol version mismatch: " + f"remote_type={remote_node_type} " + f"incoming={inbound_handshake.protocol_version} " + f"our={protocol_version[remote_node_type]}" ) outbound_handshake = make_msg(