Skip to content
Permalink
Browse files

Fix RPC calls and broken interactive daemon commands

  • Loading branch information...
miltonf committed Mar 10, 2019
1 parent e21a566 commit 479eaebe14c51f1b2c9905eea24c2bfbf6600da9
@@ -395,8 +395,6 @@ bool t_command_parser_executor::set_limit(const std::vector<std::string>& args)
std::cout << "failed to parse argument" << std::endl;
return false;
}
if (limit > 0)
limit *= 1024;

return m_executor.set_limit(limit, limit);
}
@@ -415,8 +413,6 @@ bool t_command_parser_executor::set_limit_up(const std::vector<std::string>& arg
std::cout << "failed to parse argument" << std::endl;
return false;
}
if (limit > 0)
limit *= 1024;

return m_executor.set_limit(0, limit);
}
@@ -435,8 +431,6 @@ bool t_command_parser_executor::set_limit_down(const std::vector<std::string>& a
std::cout << "failed to parse argument" << std::endl;
return false;
}
if (limit > 0)
limit *= 1024;

return m_executor.set_limit(limit, 0);
}
@@ -1181,8 +1181,8 @@ bool t_rpc_command_executor::get_limit()
}
}

tools::msg_writer() << "limit-down is " << res.limit_down/1024 << " kB/s";
tools::msg_writer() << "limit-up is " << res.limit_up/1024 << " kB/s";
tools::msg_writer() << "limit-down is " << res.limit_down << " kB/s";
tools::msg_writer() << "limit-up is " << res.limit_up << " kB/s";
return true;
}

@@ -1212,8 +1212,8 @@ bool t_rpc_command_executor::set_limit(int64_t limit_down, int64_t limit_up)
}
}

tools::msg_writer() << "Set limit-down to " << res.limit_down/1024 << " kB/s";
tools::msg_writer() << "Set limit-up to " << res.limit_up/1024 << " kB/s";
tools::msg_writer() << "Set limit-down to " << res.limit_down << " kB/s";
tools::msg_writer() << "Set limit-up to " << res.limit_up << " kB/s";
return true;
}

@@ -1240,7 +1240,7 @@ bool t_rpc_command_executor::get_limit_up()
}
}

tools::msg_writer() << "limit-up is " << res.limit_up/1024 << " kB/s";
tools::msg_writer() << "limit-up is " << res.limit_up << " kB/s";
return true;
}

@@ -1267,7 +1267,7 @@ bool t_rpc_command_executor::get_limit_down()
}
}

tools::msg_writer() << "limit-down is " << res.limit_down/1024 << " kB/s";
tools::msg_writer() << "limit-down is " << res.limit_down << " kB/s";
return true;
}

@@ -333,8 +333,8 @@ namespace nodetool
cryptonote::network_type m_nettype;
};

const int64_t default_limit_up = 2048;
const int64_t default_limit_down = 8192;
const int64_t default_limit_up = 2048; // kB/s
const int64_t default_limit_down = 8192; // kB/s
extern const command_line::arg_descriptor<std::string> arg_p2p_bind_ip;
extern const command_line::arg_descriptor<std::string, false, true, 2> arg_p2p_bind_port;
extern const command_line::arg_descriptor<uint32_t> arg_p2p_external_port;
@@ -1704,7 +1704,7 @@ namespace cryptonote
{
std::string status;
uint64_t limit_up;
uint64_t limit_down;
uint64_t limit_down; // all limits (for get and set) are kB/s
bool untrusted;

BEGIN_KV_SERIALIZE_MAP()

0 comments on commit 479eaeb

Please sign in to comment.
You can’t perform that action at this time.