mirror of
https://github.com/wownero/wownero.git
synced 2026-12-05 15:34:01 +01:00
p2p: remove dead code
Dead as of the Tor/network-zone rework973403bc9: - get_incoming_connections_count: callers moved to the network_zone& variant and to change_max_in_public_peers - make_default_peer_id, make_default_config, parse_peer_from_string: definitions removed, declarations left behind - by_id: its multi_index index was dropped - get_address<T>: added by that commit, never instantiated Dead when their last caller went: - get_outgoing_connections_count:aa93e3886- log_peerlist:4f0e8cfa9- get_white_peer_by_index, get_gray_peer_by_index:ae489ba6e- set_rpc_credits_per_hash:9b337ca01Unused since the initial import296ae46ed: - by_conn_id, by_peer_id: multi_index tags never named in any index list - modify_all, modify_all_but_id, modify_last_seen: multi_index functors never instantiated - m_peer_livetime: never read or written - m_have_address, m_first_connection_maker_call: assigned once, never read - commented-out get_local_handshake_data, m_connections_lock and m_connections declarations Also drops a commented-out number_of_peers assignment, stale since32c0f908cremoved that variable.
This commit is contained in:
@@ -67,20 +67,6 @@ namespace
|
||||
return 0;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
epee::net_utils::network_address get_address(const boost::string_ref value)
|
||||
{
|
||||
expect<T> address = T::make(value);
|
||||
if (!address)
|
||||
{
|
||||
MERROR(
|
||||
"Failed to parse " << epee::net_utils::zone_to_string(T::get_zone()) << " address \"" << value << "\": " << address.error().message()
|
||||
);
|
||||
return {};
|
||||
}
|
||||
return {std::move(*address)};
|
||||
}
|
||||
|
||||
bool start_socks(std::shared_ptr<net::socks::client> client, const net::socks::endpoint& proxy, const epee::net_utils::network_address& remote)
|
||||
{
|
||||
CHECK_AND_ASSERT_MES(client != nullptr, false, "Unexpected null client");
|
||||
@@ -296,7 +282,6 @@ namespace nodetool
|
||||
return boost::none;
|
||||
}
|
||||
|
||||
// get_address returns default constructed address on error
|
||||
if (inbounds.back().our_address == epee::net_utils::network_address{})
|
||||
return boost::none;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user