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:
  6a7c40bee4/src/addrdb.h (L84-L94)

ACKs for top commit:
  MarcoFalke:
    unsigned ACK 59853c33f1c8781480549effc39baee60ffd837c
  naumenkogs:
    ACK 59853c3

Tree-SHA512: 06b2e8e4f2b4a4f20454a4828a786878fc2bd441b0ee53f1128a7a0b6ad54dd3ca7598cee000ec60e5e4ef02570a09c01974d2d8260bd11fa9baf16b3ff9ba08
This commit is contained in:
fanquake 2019-11-01 15:29:46 -04:00 committed by Pasta
parent 6f842941ac
commit 95754c5ee0
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -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);
}