forked from lthn/blockchain
p2p: when use-only-priority-nodes is present and none of priority nodes are specified -- don't connect to seed nodes
This commit is contained in:
parent
741aae9b7f
commit
ef38eb9724
1 changed files with 2 additions and 2 deletions
|
|
@ -32,7 +32,7 @@ namespace nodetool
|
|||
const command_line::arg_descriptor<bool> arg_p2p_allow_local_ip ("allow-local-ip", "Allow local ip add to peer list, mostly in debug purposes");
|
||||
const command_line::arg_descriptor<std::vector<std::string> > arg_p2p_add_peer ("add-peer", "Manually add peer to local peerlist");
|
||||
const command_line::arg_descriptor<std::vector<std::string> > arg_p2p_add_priority_node ("add-priority-node", "Specify list of peers to connect to and attempt to keep the connection open");
|
||||
const command_line::arg_descriptor<bool> arg_p2p_use_only_priority_nodes ("use-only-priority-nodes", "Try to connect only to priority nodes");
|
||||
const command_line::arg_descriptor<bool> arg_p2p_use_only_priority_nodes ("use-only-priority-nodes", "Connect only to priority nodes");
|
||||
const command_line::arg_descriptor<std::vector<std::string> > arg_p2p_seed_node ("seed-node", "Connect to a node to retrieve peer addresses, and disconnect");
|
||||
const command_line::arg_descriptor<bool> arg_p2p_hide_my_port ("hide-my-port", "Do not announce yourself as peerlist candidate");
|
||||
const command_line::arg_descriptor<bool> arg_p2p_offline_mode ( "offline-mode", "Don't connect to any node and reject any connections");
|
||||
|
|
@ -846,7 +846,7 @@ namespace nodetool
|
|||
if (m_offline_mode)
|
||||
return true;
|
||||
|
||||
if(!m_peerlist.get_white_peers_count() && m_seed_nodes.size() && !m_priority_peers.size())
|
||||
if(!m_peerlist.get_white_peers_count() && m_seed_nodes.size() && !m_priority_peers.size() && !m_use_only_priority_peers)
|
||||
{
|
||||
size_t try_count = 0;
|
||||
size_t current_index = crypto::rand<size_t>()%m_seed_nodes.size();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue