diff options
author | xiphon <xiphon@protonmail.com> | 2020-04-10 02:24:00 +0000 |
---|---|---|
committer | xiphon <xiphon@protonmail.com> | 2020-04-21 23:40:04 +0000 |
commit | 145be6dbdb2353553676d214d7ced1b9bb5cded6 (patch) | |
tree | 71dd24502abca30e1043f053f063c86ed1f988b0 /src/p2p/net_node.h | |
parent | Merge pull request #6397 (diff) | |
download | monero-145be6dbdb2353553676d214d7ced1b9bb5cded6.tar.xz |
p2p: startup speedup, init seed nodes on first 'connect_to_seed()'
Diffstat (limited to 'src/p2p/net_node.h')
-rw-r--r-- | src/p2p/net_node.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h index 31d8aad3f..b085ec8ec 100644 --- a/src/p2p/net_node.h +++ b/src/p2p/net_node.h @@ -384,6 +384,7 @@ namespace nodetool bool is_addr_recently_failed(const epee::net_utils::network_address& addr); bool is_priority_node(const epee::net_utils::network_address& na); std::set<std::string> get_seed_nodes(cryptonote::network_type nettype) const; + std::set<std::string> get_seed_nodes(); bool connect_to_seed(); template <class Container> @@ -467,7 +468,9 @@ namespace nodetool std::list<epee::net_utils::network_address> m_priority_peers; std::vector<epee::net_utils::network_address> m_exclusive_peers; std::vector<epee::net_utils::network_address> m_seed_nodes; - bool m_fallback_seed_nodes_added; + bool m_seed_nodes_initialized = false; + boost::shared_mutex m_seed_nodes_lock; + std::atomic_flag m_fallback_seed_nodes_added; std::vector<nodetool::peerlist_entry> m_command_line_peers; uint64_t m_peer_livetime; //keep connections to initiate some interactions |