mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-27 05:13:25 +01:00
Rename delete_connections to delete_out_connections
This rename is needed so that delete_in_connections can be added.
This commit is contained in:
parent
b927c0fc7a
commit
d609a2c164
@ -118,7 +118,7 @@ namespace nodetool
|
|||||||
virtual uint64_t get_connections_count();
|
virtual uint64_t get_connections_count();
|
||||||
size_t get_outgoing_connections_count();
|
size_t get_outgoing_connections_count();
|
||||||
peerlist_manager& get_peerlist_manager(){return m_peerlist;}
|
peerlist_manager& get_peerlist_manager(){return m_peerlist;}
|
||||||
void delete_connections(size_t count);
|
void delete_out_connections(size_t count);
|
||||||
virtual bool block_host(const epee::net_utils::network_address &adress, time_t seconds = P2P_IP_BLOCKTIME);
|
virtual bool block_host(const epee::net_utils::network_address &adress, time_t seconds = P2P_IP_BLOCKTIME);
|
||||||
virtual bool unblock_host(const epee::net_utils::network_address &address);
|
virtual bool unblock_host(const epee::net_utils::network_address &address);
|
||||||
virtual std::map<std::string, time_t> get_blocked_hosts() { CRITICAL_REGION_LOCAL(m_blocked_hosts_lock); return m_blocked_hosts; }
|
virtual std::map<std::string, time_t> get_blocked_hosts() { CRITICAL_REGION_LOCAL(m_blocked_hosts_lock); return m_blocked_hosts; }
|
||||||
|
@ -1787,7 +1787,7 @@ namespace nodetool
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class t_payload_net_handler>
|
template<class t_payload_net_handler>
|
||||||
void node_server<t_payload_net_handler>::delete_connections(size_t count)
|
void node_server<t_payload_net_handler>::delete_out_connections(size_t count)
|
||||||
{
|
{
|
||||||
m_net_server.get_config_object().del_out_connections(count);
|
m_net_server.get_config_object().del_out_connections(count);
|
||||||
}
|
}
|
||||||
|
@ -1598,7 +1598,7 @@ namespace cryptonote
|
|||||||
size_t n_delete = (n_connections > req.out_peers) ? n_connections - req.out_peers : 0;
|
size_t n_delete = (n_connections > req.out_peers) ? n_connections - req.out_peers : 0;
|
||||||
m_p2p.m_config.m_net_config.max_out_connection_count = req.out_peers;
|
m_p2p.m_config.m_net_config.max_out_connection_count = req.out_peers;
|
||||||
if (n_delete)
|
if (n_delete)
|
||||||
m_p2p.delete_connections(n_delete);
|
m_p2p.delete_out_connections(n_delete);
|
||||||
res.status = CORE_RPC_STATUS_OK;
|
res.status = CORE_RPC_STATUS_OK;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user