Remove nano::transport::transport_type::udp enum

This commit is contained in:
Thiago Silva 2023-02-06 18:02:01 -03:00 committed by Thiago Silva
commit cd72cc9225
2 changed files with 4 additions and 12 deletions

View file

@ -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<nano::transport::channel> const & channel_a) { observers.endpoint.add ([this] (std::shared_ptr<nano::transport::channel> 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<nano::vote> vote_a, std::shared_ptr<nano::transport::channel> const & channel_a, nano::vote_code code_a) { observers.vote.add ([this] (std::shared_ptr<nano::vote> vote_a, std::shared_ptr<nano::transport::channel> const & channel_a, nano::vote_code code_a) {
debug_assert (code_a != nano::vote_code::invalid); debug_assert (code_a != nano::vote_code::invalid);

View file

@ -28,10 +28,9 @@ namespace transport
enum class transport_type : uint8_t enum class transport_type : uint8_t
{ {
undefined = 0, undefined = 0,
udp = 1, tcp = 1,
tcp = 2, loopback = 2,
loopback = 3, fake = 3
fake = 4
}; };
class channel class channel
{ {