mirror of
https://github.com/monero-project/monero.git
synced 2025-12-16 08:03:58 -05:00
Merge pull request #5582
fcfcc3a rpc: in/out peers can now return the setting's value (moneromooo-monero)
This commit is contained in:
commit
e241a6280d
7 changed files with 62 additions and 20 deletions
|
|
@ -494,11 +494,14 @@ bool t_command_parser_executor::set_limit_down(const std::vector<std::string>& a
|
|||
|
||||
bool t_command_parser_executor::out_peers(const std::vector<std::string>& args)
|
||||
{
|
||||
if (args.empty()) return false;
|
||||
|
||||
unsigned int limit;
|
||||
bool set = false;
|
||||
uint32_t limit = 0;
|
||||
try {
|
||||
limit = std::stoi(args[0]);
|
||||
if (!args.empty())
|
||||
{
|
||||
limit = std::stoi(args[0]);
|
||||
set = true;
|
||||
}
|
||||
}
|
||||
|
||||
catch(const std::exception& ex) {
|
||||
|
|
@ -506,16 +509,19 @@ bool t_command_parser_executor::out_peers(const std::vector<std::string>& args)
|
|||
return false;
|
||||
}
|
||||
|
||||
return m_executor.out_peers(limit);
|
||||
return m_executor.out_peers(set, limit);
|
||||
}
|
||||
|
||||
bool t_command_parser_executor::in_peers(const std::vector<std::string>& args)
|
||||
{
|
||||
if (args.empty()) return false;
|
||||
|
||||
unsigned int limit;
|
||||
bool set = false;
|
||||
uint32_t limit = 0;
|
||||
try {
|
||||
limit = std::stoi(args[0]);
|
||||
if (!args.empty())
|
||||
{
|
||||
limit = std::stoi(args[0]);
|
||||
set = true;
|
||||
}
|
||||
}
|
||||
|
||||
catch(const std::exception& ex) {
|
||||
|
|
@ -523,7 +529,7 @@ bool t_command_parser_executor::in_peers(const std::vector<std::string>& args)
|
|||
return false;
|
||||
}
|
||||
|
||||
return m_executor.in_peers(limit);
|
||||
return m_executor.in_peers(set, limit);
|
||||
}
|
||||
|
||||
bool t_command_parser_executor::hard_fork_info(const std::vector<std::string>& args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue