From 925870d7d0ea97fba101f9ba67a72d73d46fbbda Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Wed, 1 Feb 2023 10:14:02 -0500 Subject: [PATCH] merge bitcoin#27015: bitcoin#26847 fixups (AddrMan totals) --- src/addrman.h | 2 +- src/test/addrman_tests.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/addrman.h b/src/addrman.h index bcb6790b991b0..b432e6afb4c3a 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -117,7 +117,7 @@ class AddrMan * @param[in] in_new Select addresses only from one table (true = new, false = tried, nullopt = both) * @return Number of unique addresses that match specified options. */ - size_t Size(std::optional net = {}, std::optional in_new = {}) const; + size_t Size(std::optional net = std::nullopt, std::optional in_new = std::nullopt) const; /** * Attempt to add one or more addresses to addrman's new table. diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp index 4167c2b867240..97768a8851fad 100644 --- a/src/test/addrman_tests.cpp +++ b/src/test/addrman_tests.cpp @@ -1035,8 +1035,6 @@ BOOST_AUTO_TEST_CASE(load_addrman_corrupted) } catch (const std::exception&) { exceptionThrown = true; } - // Even though de-serialization failed addrman is not left in a clean state. - BOOST_CHECK(addrman1.Size() == 1); BOOST_CHECK(exceptionThrown); // Test that ReadFromStream fails if peers.dat is corrupt