HomePhabricator

DNS seeds: wait for 5m instead of 11s if 1000+ peers are known

Description

DNS seeds: wait for 5m instead of 11s if 1000+ peers are known

Summary:

If 1000 potential peers are known, wait for 5m before querying DNS seeds
for more peers, since eventually the addresses we already know should
get us connected. Also check every 11s whether we've got enough active
outbounds that DNS seeds aren't worth querying, and exit the dnsseed
thread early if so.

DNS seeds: don't query DNS while network is inactive

Backport of core PR16939.

Test Plan:

ninja all check-all

Check IBD starts as expected.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8512

Details

Provenance
Anthony Towns <aj@erisian.com.au>Authored on Feb 11 2020, 03:20
FabienCommitted on Nov 24 2020, 13:16
FabienPushed on Nov 24 2020, 13:17
Reviewer
Restricted Project
Differential Revision
D8512: DNS seeds: wait for 5m instead of 11s if 1000+ peers are known
Parents
rABC145650dc37f1: Just pass a TxId to AddInventoryKnown, rename to AddKnownTx
Branches
Unknown
Tags
Unknown