mirror of
https://github.com/monero-project/monero.git
synced 2025-11-28 19:40:33 -05:00
rpc: in/out peers can now return the setting's value
This commit is contained in:
parent
5fbfa8a656
commit
fcfcc3ac86
7 changed files with 63 additions and 21 deletions
|
|
@ -245,7 +245,9 @@ namespace nodetool
|
|||
size_t get_zone_count() const { return m_network_zones.size(); }
|
||||
|
||||
void change_max_out_public_peers(size_t count);
|
||||
uint32_t get_max_out_public_peers() const;
|
||||
void change_max_in_public_peers(size_t count);
|
||||
uint32_t get_max_in_public_peers() const;
|
||||
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 std::map<std::string, time_t> get_blocked_hosts() { CRITICAL_REGION_LOCAL(m_blocked_hosts_lock); return m_blocked_hosts; }
|
||||
|
|
|
|||
|
|
@ -2216,6 +2216,15 @@ namespace nodetool
|
|||
}
|
||||
}
|
||||
|
||||
template<class t_payload_net_handler>
|
||||
uint32_t node_server<t_payload_net_handler>::get_max_out_public_peers() const
|
||||
{
|
||||
const auto public_zone = m_network_zones.find(epee::net_utils::zone::public_);
|
||||
if (public_zone == m_network_zones.end())
|
||||
return 0;
|
||||
return public_zone->second.m_config.m_net_config.max_out_connection_count;
|
||||
}
|
||||
|
||||
template<class t_payload_net_handler>
|
||||
void node_server<t_payload_net_handler>::change_max_in_public_peers(size_t count)
|
||||
{
|
||||
|
|
@ -2229,6 +2238,15 @@ namespace nodetool
|
|||
}
|
||||
}
|
||||
|
||||
template<class t_payload_net_handler>
|
||||
uint32_t node_server<t_payload_net_handler>::get_max_in_public_peers() const
|
||||
{
|
||||
const auto public_zone = m_network_zones.find(epee::net_utils::zone::public_);
|
||||
if (public_zone == m_network_zones.end())
|
||||
return 0;
|
||||
return public_zone->second.m_config.m_net_config.max_in_connection_count;
|
||||
}
|
||||
|
||||
template<class t_payload_net_handler>
|
||||
bool node_server<t_payload_net_handler>::set_tos_flag(const boost::program_options::variables_map& vm, int flag)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue