aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet/simplewallet.cpp
diff options
context:
space:
mode:
authorZachary Michaels <mikezackles@gmail.com>2014-09-08 13:07:15 -0400
committerRiccardo Spagni <ric@spagni.net>2014-09-15 15:53:46 +0200
commit658b6690a36f6f0b3b06dca5b85021b2b344c059 (patch)
tree97c9b51aeb1dbfa759f1c6458c2e8dc57e0a55d8 /src/simplewallet/simplewallet.cpp
parentSeparate p2p port for testnet (diff)
downloadmonero-658b6690a36f6f0b3b06dca5b85021b2b344c059.tar.xz
Separate rpc port for testnet
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))
{