Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Mar 19, 2024
1 parent 3603b5f commit dd3da51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions nano/node/transport/tcp_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ auto nano::transport::tcp_server::process_message (std::unique_ptr<nano::message

return process_result::abort;
}
case handshake_status::progress:
case handshake_status::handshake:
{
return process_result::progress; // Continue handshake
}
Expand Down Expand Up @@ -567,11 +567,10 @@ auto nano::transport::tcp_server::process_handshake (nano::node_id_handshake con
return handshake_status::abort;
}

node->stats.inc (nano::stat::type::tcp_server, nano::stat::detail::node_id_handshake, nano::stat::dir::in);

handshake_received = true;

node->logger.debug (nano::log::type::tcp_server, "Handshake query received ({})", fmt::streamed (remote_endpoint));
node->stats.inc (nano::stat::type::tcp_server, nano::stat::detail::node_id_handshake, nano::stat::dir::in);
node->logger.debug (nano::log::type::tcp_server, "Handshake message received ({})", fmt::streamed (remote_endpoint));

if (message.query)
{
Expand Down Expand Up @@ -605,7 +604,7 @@ auto nano::transport::tcp_server::process_handshake (nano::node_id_handshake con
}
}

return handshake_status::progress;
return handshake_status::handshake; // Handshake is in progress
}

void nano::transport::tcp_server::send_handshake_response (nano::node_id_handshake::query_payload const & query, bool v2)
Expand Down
2 changes: 1 addition & 1 deletion nano/node/transport/tcp_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class tcp_server final : public std::enable_shared_from_this<tcp_server>
enum class handshake_status
{
abort,
progress,
handshake,
realtime,
bootstrap,
};
Expand Down

0 comments on commit dd3da51

Please sign in to comment.