aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet/simplewallet.cpp
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2018-06-11 12:16:29 +0900
committerstoffu <stoffu@protonmail.ch>2018-06-11 20:17:02 +0900
commit08b85a8e00c0b3e5bb7c4d05861f8a42593cecf1 (patch)
treece324669f3a27cecf55e4d538081135186a2e552 /src/simplewallet/simplewallet.cpp
parentMerge pull request #3340 (diff)
downloadmonero-08b85a8e00c0b3e5bb7c4d05861f8a42593cecf1.tar.xz
cryptonote_config: add get_config to refactor x = testnet ? config::testnet::X : stagenet ? config::stagenet::X : config::X
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
-rw-r--r--src/simplewallet/simplewallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 397614328..b530082d7 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -3771,7 +3771,7 @@ bool simple_wallet::set_daemon(const std::vector<std::string>& args)
// If no port has been provided, use the default from config
if (!match[3].length())
{
- int daemon_port = m_wallet->nettype() == cryptonote::TESTNET ? config::testnet::RPC_DEFAULT_PORT : m_wallet->nettype() == cryptonote::STAGENET ? config::stagenet::RPC_DEFAULT_PORT : config::RPC_DEFAULT_PORT;
+ int daemon_port = get_config(m_wallet->nettype()).RPC_DEFAULT_PORT;
daemon_url = match[1] + match[2] + std::string(":") + std::to_string(daemon_port);
} else {
daemon_url = args[0];