diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp index 97768a8851..1e2e3a8b6c 100644 --- a/src/test/addrman_tests.cpp +++ b/src/test/addrman_tests.cpp @@ -258,10 +258,7 @@ BOOST_AUTO_TEST_CASE(addrman_select_special) // use a non-deterministic addrman to ensure a passing test isn't due to setup auto addrman = std::make_unique(EMPTY_NETGROUPMAN, /*deterministic=*/false, GetCheckRatio(m_node)); - // add ipv4 address to the new table CNetAddr source = ResolveIP("252.2.2.2"); - CService addr1 = ResolveService("250.1.1.3", 8333); - BOOST_CHECK(addrman->Add({CAddress(addr1, NODE_NONE)}, source)); // add I2P address to the tried table CAddress i2p_addr; @@ -269,6 +266,10 @@ BOOST_AUTO_TEST_CASE(addrman_select_special) BOOST_CHECK(addrman->Add({i2p_addr}, source)); BOOST_CHECK(addrman->Good(i2p_addr)); + // add ipv4 address to the new table + CService addr1 = ResolveService("250.1.1.3", 8333); + BOOST_CHECK(addrman->Add({CAddress(addr1, NODE_NONE)}, source)); + // since the only ipv4 address is on the new table, ensure that the new // table gets selected even if new_only is false. if the table was being // selected at random, this test will sporadically fail