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 5791b13 commit 2cba578
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 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/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 2cba578

Please sign in to comment.