mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-26 17:52:13 +01:00
Fix nonsensical -noseednode behavior
Treat specifying -noseednode the same as not specifying any -seednode value, instead of enabling the seed node timeout and log messages, and waiting longer to add other seeds.
This commit is contained in:
parent
96d30ed4f9
commit
5453e66fd9
@ -2246,7 +2246,7 @@ void CConnman::ThreadDNSAddressSeed()
|
||||
{
|
||||
int outbound_connection_count = 0;
|
||||
|
||||
if (gArgs.IsArgSet("-seednode")) {
|
||||
if (!gArgs.GetArgs("-seednode").empty()) {
|
||||
auto start = NodeClock::now();
|
||||
constexpr std::chrono::seconds SEEDNODE_TIMEOUT = 30s;
|
||||
LogPrintf("-seednode enabled. Trying the provided seeds for %d seconds before defaulting to the dnsseeds.\n", SEEDNODE_TIMEOUT.count());
|
||||
@ -2549,7 +2549,7 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect, Spa
|
||||
auto next_extra_network_peer{start + rng.rand_exp_duration(EXTRA_NETWORK_PEER_INTERVAL)};
|
||||
const bool dnsseed = gArgs.GetBoolArg("-dnsseed", DEFAULT_DNSSEED);
|
||||
bool add_fixed_seeds = gArgs.GetBoolArg("-fixedseeds", DEFAULT_FIXEDSEEDS);
|
||||
const bool use_seednodes{gArgs.IsArgSet("-seednode")};
|
||||
const bool use_seednodes{!gArgs.GetArgs("-seednode").empty()};
|
||||
|
||||
auto seed_node_timer = NodeClock::now();
|
||||
bool add_addr_fetch{addrman.Size() == 0 && !seed_nodes.empty()};
|
||||
|
Loading…
x
Reference in New Issue
Block a user