diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-12-16 23:27:00 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-12-16 23:27:00 +0200 |
commit | 8da24c2a57fdb9a04137537f3e339e1876407d8d (patch) | |
tree | fb45239aebb9b13d52d3e13862f1c9dc636217a2 /src/p2p | |
parent | Merge pull request #2874 (diff) | |
parent | rpc: add offline state in info rpc (diff) | |
download | monero-8da24c2a57fdb9a04137537f3e339e1876407d8d.tar.xz |
Merge pull request #2878
abebe392 rpc: add offline state in info rpc (moneromooo-monero)
7696e849 core: make --offline also disable DNS lookups (moneromooo-monero)
Diffstat (limited to 'src/p2p')
-rw-r--r-- | src/p2p/net_node.inl | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index e32eb0c6b..c6792f138 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -95,7 +95,6 @@ namespace nodetool const command_line::arg_descriptor<bool> arg_p2p_hide_my_port = {"hide-my-port", "Do not announce yourself as peerlist candidate", false, true}; const command_line::arg_descriptor<bool> arg_no_igd = {"no-igd", "Disable UPnP port mapping"}; - const command_line::arg_descriptor<bool> arg_offline = {"offline", "Do not listen for peers, nor connect to any"}; const command_line::arg_descriptor<int64_t> arg_out_peers = {"out-peers", "set max number of out peers", -1}; const command_line::arg_descriptor<int> arg_tos_flag = {"tos-flag", "set TOS flag", -1}; @@ -120,7 +119,6 @@ namespace nodetool command_line::add_arg(desc, arg_p2p_seed_node); command_line::add_arg(desc, arg_p2p_hide_my_port); command_line::add_arg(desc, arg_no_igd); - command_line::add_arg(desc, arg_offline); command_line::add_arg(desc, arg_out_peers); command_line::add_arg(desc, arg_tos_flag); command_line::add_arg(desc, arg_limit_rate_up); @@ -306,7 +304,7 @@ namespace nodetool m_external_port = command_line::get_arg(vm, arg_p2p_external_port); m_allow_local_ip = command_line::get_arg(vm, arg_p2p_allow_local_ip); m_no_igd = command_line::get_arg(vm, arg_no_igd); - m_offline = command_line::get_arg(vm, arg_offline); + m_offline = command_line::get_arg(vm, cryptonote::arg_offline); if (command_line::has_arg(vm, arg_p2p_add_peer)) { @@ -1141,7 +1139,7 @@ namespace nodetool template<class t_payload_net_handler> bool node_server<t_payload_net_handler>::connect_to_seed() { - if (m_seed_nodes.empty()) + if (m_seed_nodes.empty() || m_offline) return true; size_t try_count = 0; |