diff --git a/nano/core_test/network.cpp b/nano/core_test/network.cpp index 2929ea9199..fdc49ccd8d 100644 --- a/nano/core_test/network.cpp +++ b/nano/core_test/network.cpp @@ -796,16 +796,16 @@ TEST (network, duplicate_detection) auto & node1 = *system.add_node (node_flags); nano::publish publish{ nano::dev::network_params.network, nano::dev::genesis }; - ASSERT_EQ (0, node1.stats.count (nano::stat::type::filter, nano::stat::detail::duplicate_publish)); + ASSERT_EQ (0, node1.stats.count (nano::stat::type::filter, nano::stat::detail::duplicate_publish_message)); // Publish duplicate detection through TCP auto tcp_channel = node0.network.tcp_channels.find_node_id (node1.get_node_id ()); ASSERT_NE (nullptr, tcp_channel); - ASSERT_EQ (0, node1.stats.count (nano::stat::type::filter, nano::stat::detail::duplicate_publish)); + ASSERT_EQ (0, node1.stats.count (nano::stat::type::filter, nano::stat::detail::duplicate_publish_message)); tcp_channel->send (publish); - ASSERT_TIMELY_EQ (2s, node1.stats.count (nano::stat::type::filter, nano::stat::detail::duplicate_publish), 0); + ASSERT_TIMELY_EQ (2s, node1.stats.count (nano::stat::type::filter, nano::stat::detail::duplicate_publish_message), 0); tcp_channel->send (publish); - ASSERT_TIMELY_EQ (2s, node1.stats.count (nano::stat::type::filter, nano::stat::detail::duplicate_publish), 1); + ASSERT_TIMELY_EQ (2s, node1.stats.count (nano::stat::type::filter, nano::stat::detail::duplicate_publish_message), 1); } TEST (network, duplicate_revert_publish) diff --git a/nano/lib/stats_enums.hpp b/nano/lib/stats_enums.hpp index ff9ef58190..026e00d85f 100644 --- a/nano/lib/stats_enums.hpp +++ b/nano/lib/stats_enums.hpp @@ -67,6 +67,8 @@ enum class detail : uint8_t broadcast, cleanup, top, + none, + success, // processing queue queue, @@ -172,7 +174,7 @@ enum class detail : uint8_t invalid_frontier_req_message, invalid_asc_pull_req_message, invalid_asc_pull_ack_message, - message_too_big, + message_size_too_big, outdated_version, // tcp @@ -210,7 +212,7 @@ enum class detail : uint8_t requests_unknown, // duplicate - duplicate_publish, + duplicate_publish_message, // telemetry invalid_signature, diff --git a/nano/node/transport/message_deserializer.cpp b/nano/node/transport/message_deserializer.cpp index f5e2ba11c1..f760ff5d7d 100644 --- a/nano/node/transport/message_deserializer.cpp +++ b/nano/node/transport/message_deserializer.cpp @@ -444,10 +444,10 @@ nano::stat::detail nano::to_stat_detail (nano::transport::message_deserializer:: return stat::detail::outdated_version; break; case parse_status::duplicate_publish_message: - return stat::detail::duplicate_publish; + return stat::detail::duplicate_publish_message; break; case parse_status::message_size_too_big: - return stat::detail::message_too_big; + return stat::detail::message_size_too_big; break; } return {}; diff --git a/nano/node/transport/tcp_server.cpp b/nano/node/transport/tcp_server.cpp index 9d02482b11..a698a90094 100644 --- a/nano/node/transport/tcp_server.cpp +++ b/nano/node/transport/tcp_server.cpp @@ -407,7 +407,7 @@ void nano::transport::tcp_server::received_message (std::unique_ptrstats.inc (nano::stat::type::error, nano::to_stat_detail (message_deserializer->status)); if (message_deserializer->status == transport::message_deserializer::parse_status::duplicate_publish_message) { - node->stats.inc (nano::stat::type::filter, nano::stat::detail::duplicate_publish); + node->stats.inc (nano::stat::type::filter, nano::stat::detail::duplicate_publish_message); } else {