Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

monero-wallet-rpc - Changed default cryptonote port #9211

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/wallet/wallet2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include <algorithm>
#include <numeric>
#include <string>
#include <tuple>
#include <queue>
#include <boost/format.hpp>
Expand Down Expand Up @@ -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.");
Expand Down
4 changes: 2 additions & 2 deletions src/wallet/wallet2.h
Original file line number Diff line number Diff line change
Expand Up @@ -991,13 +991,13 @@ namespace tools
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 = "");
Expand Down