Skip to content

Commit

Permalink
test: Do not instantiate CAddrDB for static call
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto authored and furszy committed Aug 10, 2021
1 parent 6b607ef commit 910d5c4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/test/net_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,8 @@ BOOST_AUTO_TEST_CASE(caddrdb_read)
CDataStream ssPeers2 = AddrmanToStream(addrmanUncorrupted);

CAddrMan addrman2;
CAddrDB adb;
BOOST_CHECK(addrman2.size() == 0);
adb.Read(addrman2, ssPeers2);
BOOST_CHECK(CAddrDB::Read(addrman2, ssPeers2));
BOOST_CHECK(addrman2.size() == 3);
}

Expand Down Expand Up @@ -162,9 +161,8 @@ BOOST_AUTO_TEST_CASE(caddrdb_read_corrupted)
CDataStream ssPeers2 = AddrmanToStream(addrmanCorrupted);

CAddrMan addrman2;
CAddrDB adb;
BOOST_CHECK(addrman2.size() == 0);
adb.Read(addrman2, ssPeers2);
BOOST_CHECK(!CAddrDB::Read(addrman2, ssPeers2));
BOOST_CHECK(addrman2.size() == 0);
}

Expand Down

0 comments on commit 910d5c4

Please sign in to comment.