mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-26 01:12:39 +00:00
Merge pull request #8585
5ffa31c
wallet2: fail to establish daemon cxn == 'Disconnected' cxn status (j-berman)
This commit is contained in:
commit
0bef4265ac
3 changed files with 5 additions and 4 deletions
|
@ -4792,7 +4792,7 @@ bool simple_wallet::try_connect_to_daemon(bool silent, uint32_t* version)
|
||||||
uint32_t version_ = 0;
|
uint32_t version_ = 0;
|
||||||
if (!version)
|
if (!version)
|
||||||
version = &version_;
|
version = &version_;
|
||||||
bool wallet_is_outdated, daemon_is_outdated = false;
|
bool wallet_is_outdated = false, daemon_is_outdated = false;
|
||||||
if (!m_wallet->check_connection(version, NULL, 200000, &wallet_is_outdated, &daemon_is_outdated))
|
if (!m_wallet->check_connection(version, NULL, 200000, &wallet_is_outdated, &daemon_is_outdated))
|
||||||
{
|
{
|
||||||
if (!silent)
|
if (!silent)
|
||||||
|
|
|
@ -63,8 +63,8 @@ namespace {
|
||||||
static const int MAX_REFRESH_INTERVAL_MILLIS = 1000 * 60 * 1;
|
static const int MAX_REFRESH_INTERVAL_MILLIS = 1000 * 60 * 1;
|
||||||
// Default refresh interval when connected to remote node
|
// Default refresh interval when connected to remote node
|
||||||
static const int DEFAULT_REMOTE_NODE_REFRESH_INTERVAL_MILLIS = 1000 * 10;
|
static const int DEFAULT_REMOTE_NODE_REFRESH_INTERVAL_MILLIS = 1000 * 10;
|
||||||
// Connection timeout 30 sec
|
// Connection timeout 20 sec
|
||||||
static const int DEFAULT_CONNECTION_TIMEOUT_MILLIS = 1000 * 30;
|
static const int DEFAULT_CONNECTION_TIMEOUT_MILLIS = 1000 * 20;
|
||||||
|
|
||||||
std::string get_default_ringdb_path(cryptonote::network_type nettype)
|
std::string get_default_ringdb_path(cryptonote::network_type nettype)
|
||||||
{
|
{
|
||||||
|
@ -2173,7 +2173,7 @@ bool WalletImpl::connectToDaemon()
|
||||||
Wallet::ConnectionStatus WalletImpl::connected() const
|
Wallet::ConnectionStatus WalletImpl::connected() const
|
||||||
{
|
{
|
||||||
uint32_t version = 0;
|
uint32_t version = 0;
|
||||||
bool wallet_is_outdated, daemon_is_outdated = false;
|
bool wallet_is_outdated = false, daemon_is_outdated = false;
|
||||||
m_is_connected = m_wallet->check_connection(&version, NULL, DEFAULT_CONNECTION_TIMEOUT_MILLIS, &wallet_is_outdated, &daemon_is_outdated);
|
m_is_connected = m_wallet->check_connection(&version, NULL, DEFAULT_CONNECTION_TIMEOUT_MILLIS, &wallet_is_outdated, &daemon_is_outdated);
|
||||||
if (!m_is_connected)
|
if (!m_is_connected)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1346,6 +1346,7 @@ bool wallet2::set_daemon(std::string daemon_address, boost::optional<epee::net_u
|
||||||
}
|
}
|
||||||
m_rpc_payment_state.expected_spent = 0;
|
m_rpc_payment_state.expected_spent = 0;
|
||||||
m_rpc_payment_state.discrepancy = 0;
|
m_rpc_payment_state.discrepancy = 0;
|
||||||
|
m_rpc_version = 0;
|
||||||
m_node_rpc_proxy.invalidate();
|
m_node_rpc_proxy.invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue