mirror of
https://github.com/monero-project/monero.git
synced 2026-01-13 05:16:48 -08:00
wallet2_api: implement runtime proxy configuration
This commit is contained in:
@@ -938,13 +938,13 @@ string WalletImpl::keysFilename() const
|
||||
return m_wallet->get_keys_file();
|
||||
}
|
||||
|
||||
bool WalletImpl::init(const std::string &daemon_address, uint64_t upper_transaction_size_limit, const std::string &daemon_username, const std::string &daemon_password, bool use_ssl, bool lightWallet)
|
||||
bool WalletImpl::init(const std::string &daemon_address, uint64_t upper_transaction_size_limit, const std::string &daemon_username, const std::string &daemon_password, bool use_ssl, bool lightWallet, const std::string &proxy_address)
|
||||
{
|
||||
clearStatus();
|
||||
m_wallet->set_light_wallet(lightWallet);
|
||||
if(daemon_username != "")
|
||||
m_daemon_login.emplace(daemon_username, daemon_password);
|
||||
return doInit(daemon_address, upper_transaction_size_limit, use_ssl);
|
||||
return doInit(daemon_address, proxy_address, upper_transaction_size_limit, use_ssl);
|
||||
}
|
||||
|
||||
bool WalletImpl::lightWalletLogin(bool &isNewWallet) const
|
||||
@@ -2088,6 +2088,11 @@ bool WalletImpl::trustedDaemon() const
|
||||
return m_wallet->is_trusted_daemon();
|
||||
}
|
||||
|
||||
bool WalletImpl::setProxy(const std::string &address)
|
||||
{
|
||||
return m_wallet->set_proxy(address);
|
||||
}
|
||||
|
||||
bool WalletImpl::watchOnly() const
|
||||
{
|
||||
return m_wallet->watch_only();
|
||||
@@ -2241,9 +2246,9 @@ void WalletImpl::pendingTxPostProcess(PendingTransactionImpl * pending)
|
||||
pending->m_pending_tx = exported_txs.ptx;
|
||||
}
|
||||
|
||||
bool WalletImpl::doInit(const string &daemon_address, uint64_t upper_transaction_size_limit, bool ssl)
|
||||
bool WalletImpl::doInit(const string &daemon_address, const std::string &proxy_address, uint64_t upper_transaction_size_limit, bool ssl)
|
||||
{
|
||||
if (!m_wallet->init(daemon_address, m_daemon_login, boost::asio::ip::tcp::endpoint{}, upper_transaction_size_limit))
|
||||
if (!m_wallet->init(daemon_address, m_daemon_login, proxy_address, upper_transaction_size_limit))
|
||||
return false;
|
||||
|
||||
// in case new wallet, this will force fast-refresh (pulling hashes instead of blocks)
|
||||
|
||||
Reference in New Issue
Block a user