Remove legacy support for endpoint dissemination:

Support for IPv6 messages was added with commit 08382d866b
and version 1.1.0. No peer presently connected to the network in a useful capacity fails
to understand v2 messages.

This commit removes the code that generates and processes v1 messages and deletes legacy
messages from the protocol buffer definition file.
This commit is contained in:
Nik Bougalis
2020-07-21 20:39:33 -07:00
parent ab4102a632
commit 85fc1e8235
4 changed files with 31 additions and 118 deletions

View File

@@ -180,15 +180,12 @@ public:
buildEndpoints(int n)
{
auto endpoints = std::make_shared<protocol::TMEndpoints>();
endpoints->mutable_endpoints()->Reserve(n);
endpoints->mutable_endpoints_v2()->Reserve(n);
for (int i = 0; i < n; i++)
{
auto* endpoint = endpoints->add_endpoints();
endpoint->set_hops(i);
std::string addr = std::string("10.0.1.") + std::to_string(i);
endpoint->mutable_ipv4()->set_ipv4(boost::endian::native_to_big(
boost::asio::ip::address_v4::from_string(addr).to_uint()));
endpoint->mutable_ipv4()->set_ipv4port(i);
auto ep = endpoints->add_endpoints_v2();
ep->set_endpoint(std::string("10.0.1.") + std::to_string(i));
ep->set_hops(i);
}
endpoints->set_version(2);