merge bitcoin#27015: bitcoin#26847 fixups (AddrMan totals)

This commit is contained in:
Kittywhiskers Van Gogh 2023-02-01 10:14:02 -05:00
parent 17110f50b3
commit 925870d7d0
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD
2 changed files with 1 additions and 3 deletions

View File

@ -117,7 +117,7 @@ public:
* @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<Network> net = {}, std::optional<bool> in_new = {}) const;
size_t Size(std::optional<Network> net = std::nullopt, std::optional<bool> in_new = std::nullopt) const;
/**
* Attempt to add one or more addresses to addrman's new table.

View File

@ -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