From 14a5c2068f53cfe1af3056375fed2587bc07d320 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 1 Nov 2018 14:51:08 +0000 Subject: p2p: tone down "no incoming connections" warning to info if in peers is 0 Also add an info if not offline, since it weakens the network --- src/p2p/net_node.inl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index a61b6107f..fbf265fc9 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -1334,12 +1334,19 @@ namespace nodetool template bool node_server::check_incoming_connections() { - if (m_offline || m_hide_my_port) + if (m_offline) return true; if (get_incoming_connections_count() == 0) { - const el::Level level = el::Level::Warning; - MCLOG_RED(level, "global", "No incoming connections - check firewalls/routers allow port " << get_this_peer_port()); + if (m_hide_my_port || m_config.m_net_config.max_in_connection_count == 0) + { + MGINFO("Incoming connections disabled, enable them for full connectivity"); + } + else + { + const el::Level level = el::Level::Warning; + MCLOG_RED(level, "global", "No incoming connections - check firewalls/routers allow port " << get_this_peer_port()); + } } return true; } -- cgit v1.2.3 From 03fc731bf23ec828af1999fc8f4a651605ea6a57 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Thu, 1 Nov 2018 22:00:01 +0000 Subject: p2p: less frequent incoming connections check --- src/p2p/net_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h index 90e2f78b1..cc6e47e4f 100644 --- a/src/p2p/net_node.h +++ b/src/p2p/net_node.h @@ -308,7 +308,7 @@ namespace nodetool epee::math_helper::once_a_time_seconds<1> m_connections_maker_interval; epee::math_helper::once_a_time_seconds<60*30, false> m_peerlist_store_interval; epee::math_helper::once_a_time_seconds<60> m_gray_peerlist_housekeeping_interval; - epee::math_helper::once_a_time_seconds<900, false> m_incoming_connections_interval; + epee::math_helper::once_a_time_seconds<3600, false> m_incoming_connections_interval; std::string m_bind_ip; std::string m_port; -- cgit v1.2.3