Commit Graph

6 Commits

Author SHA1 Message Date
Amiti Uttarwar
4c89e24f64 [test] Test the delay before querying DNS seeds
When starting up with a populated addrman, ThreadDNSAddressSeed adds a delay
during which time the node may be able to connect to some peers. This commit
tests the delay changes based on the number of addresses in the addrman.
2021-07-30 11:15:49 -07:00
Amiti Uttarwar
6395c8ed56 [test] Test the interactions between -forcednsseed and -dnsseed
Test that passing conflicting parameters for the two causes a startup error.
This logic also impacts -connect, which soft sets -dnsseed, so add a test for
that too.
2021-07-30 11:15:49 -07:00
Amiti Uttarwar
26d0ffe4f2 [test] Test -forcednsseed causes querying DNS seeds 2021-07-30 11:15:49 -07:00
Amiti Uttarwar
35851450a9 [test] Test the interactions between -connect and -dnsseed 2021-07-30 11:15:49 -07:00
Amiti Uttarwar
75c05af361 [test] Test logic to query DNS seeds with block-relay-only connections
When a node is able to properly shutdown, it will persist its block-relay-only
connections to the addrman. On startup, it will attempt to reconnect to these
anchors. Since block-relay-only connections do not participate in ADDR relay,
succesful connections are insufficient to skip querying the DNS seeds.

This test fails prior to the changes in #22013.

Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
2021-07-30 11:15:49 -07:00
Amiti Uttarwar
9c08719778 [test] Introduce test logic to query DNS seeds
This commit introduces a DNS seed to the regest chain params in order to add
coverage to the DNS querying logic.

The first test checks that we do not query DNS seeds if we are able to
succesfully connect to 2 outbound connections. Since we participate in ADDR
relay with those connections, including sending a GETADDR message during the
VERSION handshake, querying the DNS seeds is unnecessary.

Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
2021-07-30 11:15:49 -07:00