From cd72cc922594d0dcc6a48c0237086c65d9fe3a1f Mon Sep 17 00:00:00 2001 From: Thiago Silva Date: Mon, 6 Feb 2023 18:02:01 -0300 Subject: [PATCH] Remove nano::transport::transport_type::udp enum --- nano/node/node.cpp | 9 +-------- nano/node/transport/transport.hpp | 7 +++---- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/nano/node/node.cpp b/nano/node/node.cpp index 44221879a..00216c26f 100644 --- a/nano/node/node.cpp +++ b/nano/node/node.cpp @@ -319,14 +319,7 @@ nano::node::node (boost::asio::io_context & io_ctx_a, boost::filesystem::path co } }); observers.endpoint.add ([this] (std::shared_ptr const & channel_a) { - if (channel_a->get_type () == nano::transport::transport_type::udp) - { - this->network.send_keepalive (channel_a); - } - else - { - this->network.send_keepalive_self (channel_a); - } + this->network.send_keepalive_self (channel_a); }); observers.vote.add ([this] (std::shared_ptr vote_a, std::shared_ptr const & channel_a, nano::vote_code code_a) { debug_assert (code_a != nano::vote_code::invalid); diff --git a/nano/node/transport/transport.hpp b/nano/node/transport/transport.hpp index 5d1b7ed95..69d794327 100644 --- a/nano/node/transport/transport.hpp +++ b/nano/node/transport/transport.hpp @@ -28,10 +28,9 @@ namespace transport enum class transport_type : uint8_t { undefined = 0, - udp = 1, - tcp = 2, - loopback = 3, - fake = 4 + tcp = 1, + loopback = 2, + fake = 3 }; class channel {