Merge pull request #3196

eda9fb5b p2p: fix testnet/mainnet port mixup (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2018-02-16 14:31:16 +01:00
commit ef91d6e61e
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -263,6 +263,8 @@ namespace nodetool
const boost::program_options::variables_map& vm const boost::program_options::variables_map& vm
) )
{ {
m_testnet = command_line::get_arg(vm, cryptonote::arg_testnet_on);
auto p2p_bind_arg = m_testnet ? arg_testnet_p2p_bind_port : arg_p2p_bind_port; auto p2p_bind_arg = m_testnet ? arg_testnet_p2p_bind_port : arg_p2p_bind_port;
m_bind_ip = command_line::get_arg(vm, arg_p2p_bind_ip); m_bind_ip = command_line::get_arg(vm, arg_p2p_bind_ip);
@ -271,7 +273,6 @@ namespace nodetool
m_allow_local_ip = command_line::get_arg(vm, arg_p2p_allow_local_ip); m_allow_local_ip = command_line::get_arg(vm, arg_p2p_allow_local_ip);
m_no_igd = command_line::get_arg(vm, arg_no_igd); m_no_igd = command_line::get_arg(vm, arg_no_igd);
m_offline = command_line::get_arg(vm, cryptonote::arg_offline); m_offline = command_line::get_arg(vm, cryptonote::arg_offline);
m_testnet = command_line::get_arg(vm, cryptonote::arg_testnet_on);
if (command_line::has_arg(vm, arg_p2p_add_peer)) if (command_line::has_arg(vm, arg_p2p_add_peer))
{ {