diff options
author | Martin Zumsande <mzumsande@gmail.com> | 2022-11-30 15:55:22 -0500 |
---|---|---|
committer | Martin Zumsande <mzumsande@gmail.com> | 2023-01-26 18:11:13 -0500 |
commit | c77c877a8e916878e09f64b2faa12eeca7528cc8 (patch) | |
tree | 9f5af3f199dd4a75787fe1389e126d0c769326d7 /src/net.h | |
parent | d35595a78a4a6cae72d3204c1ec3f82f77a10d56 (diff) |
net: Load fixed seeds from reachable networks for which we don't have addresses
Previously, we'd only load fixed seeds if we'd not
know any addresses at all. This change makes it possible
to change -onlynet abruptly, e.g. from -onlynet=onion to
-onlynet=i2p and still find peers.
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -39,6 +39,7 @@ #include <memory> #include <optional> #include <thread> +#include <unordered_set> #include <vector> class AddrMan; @@ -970,6 +971,12 @@ private: void RecordBytesSent(uint64_t bytes) EXCLUSIVE_LOCKS_REQUIRED(!m_total_bytes_sent_mutex); /** + Return reachable networks for which we have no addresses in addrman and therefore + may require loading fixed seeds. + */ + std::unordered_set<Network> GetReachableEmptyNetworks() const; + + /** * Return vector of current BLOCK_RELAY peers. */ std::vector<CAddress> GetCurrentBlockRelayOnlyConns() const; |