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/wallet | |
parent | Separate p2p port for testnet (diff) | |
download | monero-658b6690a36f6f0b3b06dca5b85021b2b344c059.tar.xz |
Separate rpc port for testnet
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet2.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index bbf5bab61..b8b728425 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -542,8 +542,12 @@ bool wallet2::check_connection() net_utils::http::url_content u; net_utils::parse_url(m_daemon_address, u); + if(!u.port) - u.port = config::RPC_DEFAULT_PORT; + { + u.port = m_testnet ? config::testnet::RPC_DEFAULT_PORT : config::RPC_DEFAULT_PORT; + } + return m_http_client.connect(u.host, std::to_string(u.port), WALLET_RCP_CONNECTION_TIMEOUT); } //---------------------------------------------------------------------------------------------------- |