diff options
-rw-r--r-- | src/test/addrman_tests.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp index 572b9871dc..2b9bae7963 100644 --- a/src/test/addrman_tests.cpp +++ b/src/test/addrman_tests.cpp @@ -949,9 +949,7 @@ static CDataStream AddrmanToStream(const AddrMan& addrman) CDataStream ssPeersIn(SER_DISK, CLIENT_VERSION); ssPeersIn << Params().MessageStart(); ssPeersIn << addrman; - std::string str = ssPeersIn.str(); - std::vector<unsigned char> vchData(str.begin(), str.end()); - return CDataStream(vchData, SER_DISK, CLIENT_VERSION); + return ssPeersIn; } BOOST_AUTO_TEST_CASE(load_addrman) @@ -1023,9 +1021,7 @@ static CDataStream MakeCorruptPeersDat() AddrInfo info = AddrInfo(addr, resolved); s << info; - std::string str = s.str(); - std::vector<unsigned char> vchData(str.begin(), str.end()); - return CDataStream(vchData, SER_DISK, CLIENT_VERSION); + return s; } BOOST_AUTO_TEST_CASE(load_addrman_corrupted) |