Page MenuHomePhabricator

net: ignore block-relay-only peers when skipping DNS seed
ClosedPublic

Authored by PiRK on Nov 18 2022, 09:29.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC860a0d7d1372: net: ignore block-relay-only peers when skipping DNS seed
Summary

PR description:

Since core#17428 bitcoind will attempt to reconnect to two block-relay-only anchors before doing any other outbound connections. When determining whether to use DNS seeds, it will currently see these two peers and decide "we're connected to the p2p network, so no need to lookup DNS" -- but block-relay-only peers don't do address relay, so if your address book is full of invalid addresses (apart from your anchors) this behaviour will prevent you from recovering from that situation.

This patch changes it so that it only skips use of DNS seeds when there are two full-outbound peers, not just block-relay-only peers.

core#17428 was backported in D10507 -- D10513

This is a backport of core#22013

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable