From 95754c5ee08b58bc37b1767c0f6a7076903e3762 Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 1 Nov 2019 15:29:46 -0400 Subject: [PATCH] Merge #17345: test: Do not instantiate CAddrDB for static call CAddrDB::Read() 59853c33f1c8781480549effc39baee60ffd837c test: Do not instantiate CAddrDB for static call (Hennadii Stepanov) Pull request description: Ref: https://github.com/bitcoin/bitcoin/blob/6a7c40bee403cadedeecd4b1c6528575522094eb/src/addrdb.h#L84-L94 ACKs for top commit: MarcoFalke: unsigned ACK 59853c33f1c8781480549effc39baee60ffd837c naumenkogs: ACK 59853c3 Tree-SHA512: 06b2e8e4f2b4a4f20454a4828a786878fc2bd441b0ee53f1128a7a0b6ad54dd3ca7598cee000ec60e5e4ef02570a09c01974d2d8260bd11fa9baf16b3ff9ba08 --- src/test/net_tests.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp index 3f46ada7e3..fbfcfb7605 100644 --- a/src/test/net_tests.cpp +++ b/src/test/net_tests.cpp @@ -130,9 +130,8 @@ BOOST_AUTO_TEST_CASE(caddrdb_read) CDataStream ssPeers2 = AddrmanToStream(addrmanUncorrupted); CAddrMan addrman2; - CAddrDB adb; BOOST_CHECK(addrman2.size() == 0); - BOOST_CHECK(adb.Read(addrman2, ssPeers2)); + BOOST_CHECK(CAddrDB::Read(addrman2, ssPeers2)); BOOST_CHECK(addrman2.size() == 3); } @@ -163,9 +162,8 @@ BOOST_AUTO_TEST_CASE(caddrdb_read_corrupted) CDataStream ssPeers2 = AddrmanToStream(addrmanCorrupted); CAddrMan addrman2; - CAddrDB adb; BOOST_CHECK(addrman2.size() == 0); - BOOST_CHECK(!adb.Read(addrman2, ssPeers2)); + BOOST_CHECK(!CAddrDB::Read(addrman2, ssPeers2)); BOOST_CHECK(addrman2.size() == 0); }