mirror of
https://github.com/monero-project/monero.git
synced 2026-01-18 23:55:47 -08:00
print limits when running limit commands with no arguments
It's more user friendly that an error message saying the command does not exist.
This commit is contained in:
@@ -199,6 +199,23 @@ void connection_basic::set_rate_down_limit(uint64_t limit) {
|
||||
save_limit_to_file(limit);
|
||||
}
|
||||
|
||||
uint64_t connection_basic::get_rate_up_limit() {
|
||||
uint64_t limit;
|
||||
{
|
||||
CRITICAL_REGION_LOCAL( network_throttle_manager::m_lock_get_global_throttle_out );
|
||||
limit = network_throttle_manager::get_global_throttle_out().get_terget_speed();
|
||||
}
|
||||
return limit;
|
||||
}
|
||||
|
||||
uint64_t connection_basic::get_rate_down_limit() {
|
||||
uint64_t limit;
|
||||
{
|
||||
CRITICAL_REGION_LOCAL( network_throttle_manager::m_lock_get_global_throttle_in );
|
||||
limit = network_throttle_manager::get_global_throttle_in().get_terget_speed();
|
||||
}
|
||||
return limit;
|
||||
}
|
||||
|
||||
void connection_basic::save_limit_to_file(int limit) {
|
||||
// saving limit to file
|
||||
|
||||
Reference in New Issue
Block a user