aboutsummaryrefslogtreecommitdiff
path: root/src/test/addrman_tests.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-11-12 12:10:10 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-11-12 11:40:39 +0100
commitfab9264be50955224b06868759d37547cabe48a4 (patch)
tree5fe80cc6f29e355db5527c79b4ebbf0d3f792ea2 /src/test/addrman_tests.cpp
parent1ff265a20c36ada4c7b1c5c88d31eb92ec9e8420 (diff)
test: Remove unused CDataStream copy
Diffstat (limited to 'src/test/addrman_tests.cpp')
-rw-r--r--src/test/addrman_tests.cpp8
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)