Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only print warnings about protocol mismatches for farmer and harvester #17801

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions chia/server/ws_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]}"
)
Expand Down Expand Up @@ -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(
Expand Down
Loading