diff options
| author | Zachary Michaels <mikezackles@gmail.com> | 2014-09-08 13:07:15 -0400 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2014-09-15 15:53:46 +0200 |
| commit | 658b6690a36f6f0b3b06dca5b85021b2b344c059 (patch) | |
| tree | 97c9b51aeb1dbfa759f1c6458c2e8dc57e0a55d8 /src/simplewallet/simplewallet.cpp | |
| parent | 98ed9a41f7bf0d904e257372f4561aea3ad12c18 (diff) | |
| download | monzero-core-658b6690a36f6f0b3b06dca5b85021b2b344c059.tar.gz monzero-core-658b6690a36f6f0b3b06dca5b85021b2b344c059.tar.xz monzero-core-658b6690a36f6f0b3b06dca5b85021b2b344c059.zip | |
Separate rpc port for testnet
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
| -rw-r--r-- | src/simplewallet/simplewallet.cpp | 10 |
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)) { |
