Skip to content

Commit

Permalink
Ignore telemetry requests
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Aug 6, 2024
1 parent b7ae57a commit f25037e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions nano/node/message_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,7 @@ class process_visitor : public nano::message_visitor

void telemetry_req (nano::telemetry_req const & message) override
{
// Send an empty telemetry_ack if we do not want, just to acknowledge that we have received the message to
// remove any timeouts on the server side waiting for a message.
nano::telemetry_ack telemetry_ack{ node.network_params.network };
if (!node.flags.disable_providing_telemetry_metrics)
{
auto telemetry_data = node.local_telemetry ();
telemetry_ack = nano::telemetry_ack{ node.network_params.network, telemetry_data };
}
channel->send (telemetry_ack, nullptr, nano::transport::buffer_drop_policy::no_socket_drop);
// Ignore telemetry requests as telemetry is being periodically broadcasted since V25+
}

void telemetry_ack (nano::telemetry_ack const & message) override
Expand Down
2 changes: 1 addition & 1 deletion nano/node/nodeconfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class node_flags final
bool disable_request_loop{ false }; // For testing only
bool disable_tcp_realtime{ false };
bool disable_providing_telemetry_metrics{ false };
bool disable_ongoing_telemetry_requests{ false };
bool disable_ongoing_telemetry_requests{ true };
bool disable_block_processor_unchecked_deletion{ false };
bool disable_block_processor_republishing{ false };
bool allow_bootstrap_peers_duplicates{ false };
Expand Down
2 changes: 1 addition & 1 deletion nano/node/telemetry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class telemetry
public:
struct config
{
bool enable_ongoing_requests{ true };
bool enable_ongoing_requests{ false };
bool enable_ongoing_broadcasts{ true };

config (nano::node_config const & config, nano::node_flags const & flags) :
Expand Down

0 comments on commit f25037e

Please sign in to comment.