mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
doc: comment "add only reachable addresses to addrman"
This commit is contained in:
@@ -1648,6 +1648,14 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
|
|||||||
|
|
||||||
if (add_fixed_seeds_now) {
|
if (add_fixed_seeds_now) {
|
||||||
std::vector<CAddress> seed_addrs{ConvertSeeds(Params().FixedSeeds())};
|
std::vector<CAddress> seed_addrs{ConvertSeeds(Params().FixedSeeds())};
|
||||||
|
// We will not make outgoing connections to peers that are unreachable
|
||||||
|
// (e.g. because of -onlynet configuration).
|
||||||
|
// Therefore, we do not add them to addrman in the first place.
|
||||||
|
// Note that if you change -onlynet setting from one network to another,
|
||||||
|
// peers.dat will contain only peers of unreachable networks and
|
||||||
|
// manual intervention will be needed (either delete peers.dat after
|
||||||
|
// configuration change or manually add some reachable peer using addnode),
|
||||||
|
// see <https://github.com/bitcoin/bitcoin/issues/26035> for details.
|
||||||
seed_addrs.erase(std::remove_if(seed_addrs.begin(), seed_addrs.end(),
|
seed_addrs.erase(std::remove_if(seed_addrs.begin(), seed_addrs.end(),
|
||||||
[](const CAddress& addr) { return !IsReachable(addr); }),
|
[](const CAddress& addr) { return !IsReachable(addr); }),
|
||||||
seed_addrs.end());
|
seed_addrs.end());
|
||||||
|
|||||||
Reference in New Issue
Block a user