mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Remove unused legacy endpoint reporting
This commit is contained in:
committed by
Howard Hinnant
parent
d197c9780a
commit
2ae68923cc
@@ -985,24 +985,8 @@ PeerImp::onMessage (std::shared_ptr <protocol::TMGetPeers> const& m)
|
||||
void
|
||||
PeerImp::onMessage (std::shared_ptr <protocol::TMPeers> const& m)
|
||||
{
|
||||
// VFALCO TODO This message is now obsolete due to PeerFinder
|
||||
std::vector <beast::IP::Endpoint> list;
|
||||
list.reserve (m->nodes().size());
|
||||
for (int i = 0; i < m->nodes ().size (); ++i)
|
||||
{
|
||||
in_addr addr;
|
||||
|
||||
addr.s_addr = m->nodes (i).ipv4 ();
|
||||
|
||||
{
|
||||
beast::IP::AddressV4 v4 (ntohl (addr.s_addr));
|
||||
beast::IP::Endpoint address (v4, m->nodes (i).ipv4port ());
|
||||
list.push_back (address);
|
||||
}
|
||||
}
|
||||
|
||||
if (! list.empty())
|
||||
overlay_.peerFinder().on_legacy_endpoints (list);
|
||||
// This message is obsolete due to PeerFinder and
|
||||
// we no longer process it.
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -189,9 +189,6 @@ public:
|
||||
virtual void on_endpoints (Slot::ptr const& slot,
|
||||
Endpoints const& endpoints) = 0;
|
||||
|
||||
/** Called when legacy IP/port addresses are received. */
|
||||
virtual void on_legacy_endpoints (IPAddresses const& addresses) = 0;
|
||||
|
||||
/** Called when the slot is closed.
|
||||
This always happens when the socket is closed, unless the socket
|
||||
was canceled.
|
||||
|
||||
@@ -816,15 +816,6 @@ public:
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
void on_legacy_endpoints (IPAddresses const& list)
|
||||
{
|
||||
// Ignoring them also seems a valid choice.
|
||||
std::lock_guard<std::recursive_mutex> _(lock_);
|
||||
for (IPAddresses::const_iterator iter (list.begin());
|
||||
iter != list.end(); ++iter)
|
||||
bootcache_.insert (*iter);
|
||||
}
|
||||
|
||||
void remove (SlotImp::ptr const& slot)
|
||||
{
|
||||
auto const iter = slots_.find (
|
||||
|
||||
@@ -142,12 +142,6 @@ public:
|
||||
m_logic.on_endpoints (impl, endpoints);
|
||||
}
|
||||
|
||||
void
|
||||
on_legacy_endpoints (IPAddresses const& addresses) override
|
||||
{
|
||||
m_logic.on_legacy_endpoints (addresses);
|
||||
}
|
||||
|
||||
void
|
||||
on_closed (Slot::ptr const& slot) override
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user