aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2024-05-20 23:16:59 -0500
committerluigi1111 <luigi1111w@gmail.com>2024-05-20 23:16:59 -0500
commit1e5ad57e2ecf61bf02751bb4d3d69dab7dfd92e3 (patch)
treee331fe9aaf61729316522ec0d462cda917dc6dd7 /src
parentMerge pull request #9205 (diff)
parentRemoved default cryptonote address (diff)
downloadmonero-1e5ad57e2ecf61bf02751bb4d3d69dab7dfd92e3.tar.xz
Merge pull request #9211
9b946ae Removed default cryptonote address (SyntheticBird45)
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet2.cpp5
-rw-r--r--src/wallet/wallet2.h4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 422e535dc..f37b97ce4 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -30,6 +30,7 @@
#include <algorithm>
#include <numeric>
+#include <string>
#include <tuple>
#include <queue>
#include <boost/format.hpp>
@@ -1360,6 +1361,10 @@ bool wallet2::set_daemon(std::string daemon_address, boost::optional<epee::net_u
{
boost::lock_guard<boost::recursive_mutex> lock(m_daemon_rpc_mutex);
+ if(daemon_address.empty()) {
+ daemon_address.append("http://localhost:" + std::to_string(get_config(m_nettype).RPC_DEFAULT_PORT));
+ }
+
if(m_http_client->is_connected())
m_http_client->disconnect();
CHECK_AND_ASSERT_MES2(m_proxy.empty() || proxy.empty() , "It is not possible to set global proxy (--proxy) and daemon specific proxy together.");
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
index 30d2516c0..5f2f0e0c4 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -992,13 +992,13 @@ private:
uint64_t max_reorg_depth() const {return m_max_reorg_depth;}
bool deinit();
- bool init(std::string daemon_address = "http://localhost:8080",
+ bool init(std::string daemon_address,
boost::optional<epee::net_utils::http::login> daemon_login = boost::none,
const std::string &proxy = "",
uint64_t upper_transaction_weight_limit = 0,
bool trusted_daemon = true,
epee::net_utils::ssl_options_t ssl_options = epee::net_utils::ssl_support_t::e_ssl_support_autodetect);
- bool set_daemon(std::string daemon_address = "http://localhost:8080",
+ bool set_daemon(std::string daemon_address,
boost::optional<epee::net_utils::http::login> daemon_login = boost::none, bool trusted_daemon = true,
epee::net_utils::ssl_options_t ssl_options = epee::net_utils::ssl_support_t::e_ssl_support_autodetect,
const std::string &proxy = "");