mirror of
https://codeberg.org/nahuhh/wownero
synced 2026-12-04 15:34:03 +01:00
Merge pull request 'upstream' (#494) from wowario/wownero:upstream into master
Reviewed-on: https://codeberg.org/wownero/wownero/pulls/494
This commit is contained in:
+12
-3
@@ -1280,6 +1280,11 @@ bool wallet2::has_stagenet_option(const boost::program_options::variables_map& v
|
||||
return command_line::get_arg(vm, options().stagenet);
|
||||
}
|
||||
|
||||
bool wallet2::has_proxy_option() const
|
||||
{
|
||||
return !m_proxy.empty();
|
||||
}
|
||||
|
||||
std::string wallet2::device_name_option(const boost::program_options::variables_map& vm)
|
||||
{
|
||||
return command_line::get_arg(vm, options().hw_device);
|
||||
@@ -1364,12 +1369,15 @@ std::unique_ptr<wallet2> wallet2::make_dummy(const boost::program_options::varia
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
bool wallet2::set_daemon(std::string daemon_address, boost::optional<epee::net_utils::http::login> daemon_login, bool trusted_daemon, epee::net_utils::ssl_options_t ssl_options)
|
||||
bool wallet2::set_daemon(std::string daemon_address, boost::optional<epee::net_utils::http::login> daemon_login, bool trusted_daemon, epee::net_utils::ssl_options_t ssl_options, const std::string& proxy)
|
||||
{
|
||||
boost::lock_guard<boost::recursive_mutex> lock(m_daemon_rpc_mutex);
|
||||
|
||||
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.");
|
||||
if(m_proxy.empty())
|
||||
CHECK_AND_ASSERT_MES(set_proxy(proxy), false, "failed to set proxy address");
|
||||
const bool changed = m_daemon_address != daemon_address;
|
||||
m_daemon_address = std::move(daemon_address);
|
||||
m_daemon_login = std::move(daemon_login);
|
||||
@@ -1404,7 +1412,8 @@ bool wallet2::set_proxy(const std::string &address)
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
bool wallet2::init(std::string daemon_address, boost::optional<epee::net_utils::http::login> daemon_login, const std::string &proxy_address, uint64_t upper_transaction_weight_limit, bool trusted_daemon, epee::net_utils::ssl_options_t ssl_options)
|
||||
{
|
||||
CHECK_AND_ASSERT_MES(set_proxy(proxy_address), false, "failed to set proxy address");
|
||||
m_proxy = proxy_address;
|
||||
CHECK_AND_ASSERT_MES(set_proxy(m_proxy), false, "failed to set proxy address");
|
||||
m_checkpoints.init_default_checkpoints(m_nettype);
|
||||
m_is_initialized = true;
|
||||
m_upper_transaction_weight_limit = upper_transaction_weight_limit;
|
||||
@@ -6143,7 +6152,7 @@ void wallet2::load(const std::string& wallet_, const epee::wipeable_string& pass
|
||||
bool r = true;
|
||||
if (use_fs)
|
||||
{
|
||||
load_from_file(m_wallet_file, cache_file_buf, std::numeric_limits<size_t>::max());
|
||||
r = load_from_file(m_wallet_file, cache_file_buf, std::numeric_limits<size_t>::max());
|
||||
THROW_WALLET_EXCEPTION_IF(!r, error::file_read_error, m_wallet_file);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user