Expose limit-rate defaults from command line help
This commit is contained in:
parent
4cbb476cd1
commit
2bd46065ae
|
@ -113,6 +113,8 @@
|
||||||
#define P2P_DEFAULT_HANDSHAKE_INVOKE_TIMEOUT 5000 //5 seconds
|
#define P2P_DEFAULT_HANDSHAKE_INVOKE_TIMEOUT 5000 //5 seconds
|
||||||
#define P2P_DEFAULT_WHITELIST_CONNECTIONS_PERCENT 70
|
#define P2P_DEFAULT_WHITELIST_CONNECTIONS_PERCENT 70
|
||||||
#define P2P_DEFAULT_ANCHOR_CONNECTIONS_COUNT 2
|
#define P2P_DEFAULT_ANCHOR_CONNECTIONS_COUNT 2
|
||||||
|
#define P2P_DEFAULT_LIMIT_RATE_UP 2048 // kB/s
|
||||||
|
#define P2P_DEFAULT_LIMIT_RATE_DOWN 8192 // kB/s
|
||||||
|
|
||||||
#define P2P_FAILED_ADDR_FORGET_SECONDS (60*60) //1 hour
|
#define P2P_FAILED_ADDR_FORGET_SECONDS (60*60) //1 hour
|
||||||
#define P2P_IP_BLOCKTIME (60*60*24) //24 hour
|
#define P2P_IP_BLOCKTIME (60*60*24) //24 hour
|
||||||
|
|
|
@ -62,8 +62,8 @@ namespace nodetool
|
||||||
const command_line::arg_descriptor<int64_t> arg_in_peers = {"in-peers", "set max number of in peers", -1};
|
const command_line::arg_descriptor<int64_t> arg_in_peers = {"in-peers", "set max number of in peers", -1};
|
||||||
const command_line::arg_descriptor<int> arg_tos_flag = {"tos-flag", "set TOS flag", -1};
|
const command_line::arg_descriptor<int> arg_tos_flag = {"tos-flag", "set TOS flag", -1};
|
||||||
|
|
||||||
const command_line::arg_descriptor<int64_t> arg_limit_rate_up = {"limit-rate-up", "set limit-rate-up [kB/s]", -1};
|
const command_line::arg_descriptor<int64_t> arg_limit_rate_up = {"limit-rate-up", "set limit-rate-up [kB/s]", P2P_DEFAULT_LIMIT_RATE_UP};
|
||||||
const command_line::arg_descriptor<int64_t> arg_limit_rate_down = {"limit-rate-down", "set limit-rate-down [kB/s]", -1};
|
const command_line::arg_descriptor<int64_t> arg_limit_rate_down = {"limit-rate-down", "set limit-rate-down [kB/s]", P2P_DEFAULT_LIMIT_RATE_DOWN};
|
||||||
const command_line::arg_descriptor<int64_t> arg_limit_rate = {"limit-rate", "set limit-rate [kB/s]", -1};
|
const command_line::arg_descriptor<int64_t> arg_limit_rate = {"limit-rate", "set limit-rate [kB/s]", -1};
|
||||||
|
|
||||||
const command_line::arg_descriptor<bool> arg_save_graph = {"save-graph", "Save data for dr monero", false};
|
const command_line::arg_descriptor<bool> arg_save_graph = {"save-graph", "Save data for dr monero", false};
|
||||||
|
|
|
@ -337,8 +337,8 @@ namespace nodetool
|
||||||
cryptonote::network_type m_nettype;
|
cryptonote::network_type m_nettype;
|
||||||
};
|
};
|
||||||
|
|
||||||
const int64_t default_limit_up = 2048; // kB/s
|
const int64_t default_limit_up = P2P_DEFAULT_LIMIT_RATE_UP; // kB/s
|
||||||
const int64_t default_limit_down = 8192; // kB/s
|
const int64_t default_limit_down = P2P_DEFAULT_LIMIT_RATE_DOWN; // kB/s
|
||||||
extern const command_line::arg_descriptor<std::string> arg_p2p_bind_ip;
|
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<std::string, false, true, 2> arg_p2p_bind_port;
|
||||||
extern const command_line::arg_descriptor<uint32_t> arg_p2p_external_port;
|
extern const command_line::arg_descriptor<uint32_t> arg_p2p_external_port;
|
||||||
|
|
Loading…
Reference in New Issue