aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet/simplewallet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
-rw-r--r--src/simplewallet/simplewallet.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 45bc6f847..6c97dc807 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -328,15 +328,19 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm)
if(!ask_wallet_create_if_needed()) return false;
}
+ bool testnet = command_line::get_arg(vm, arg_testnet);
+
if (m_daemon_host.empty())
m_daemon_host = "localhost";
+
if (!m_daemon_port)
- m_daemon_port = config::RPC_DEFAULT_PORT;
+ {
+ m_daemon_port = testnet ? config::testnet::RPC_DEFAULT_PORT : config::RPC_DEFAULT_PORT;
+ }
+
if (m_daemon_address.empty())
m_daemon_address = std::string("http://") + m_daemon_host + ":" + std::to_string(m_daemon_port);
- bool testnet = command_line::get_arg(vm, arg_testnet);
-
tools::password_container pwd_container;
if (command_line::has_arg(vm, arg_password))
{