Skip to content

Commit

Permalink
Remove nano::transport::transport_type::udp enum
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiago Silva authored and thsfs committed Feb 15, 2023
1 parent 1865d61 commit cd72cc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
9 changes: 1 addition & 8 deletions nano/node/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
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) {
debug_assert (code_a != nano::vote_code::invalid);
Expand Down
7 changes: 3 additions & 4 deletions nano/node/transport/transport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit cd72cc9

Please sign in to comment.