diff options
author | luigi1111 <luigi1111w@gmail.com> | 2022-09-26 14:57:58 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2022-09-26 14:57:58 -0500 |
commit | 0bef4265ac0d2decd679367f767fa885c9f9625e (patch) | |
tree | f6bb3fa85f4b58f876f191824c9e71e6c8c0165d | |
parent | Merge pull request #8582 (diff) | |
parent | wallet2: fail to establish daemon cxn == "Disconnected" cxn status (diff) | |
download | monero-0bef4265ac0d2decd679367f767fa885c9f9625e.tar.xz |
Merge pull request #8585
5ffa31c wallet2: fail to establish daemon cxn == 'Disconnected' cxn status (j-berman)
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 2 | ||||
-rw-r--r-- | src/wallet/api/wallet.cpp | 6 | ||||
-rw-r--r-- | src/wallet/wallet2.cpp | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 96dd2dd2f..f59af575e 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -4792,7 +4792,7 @@ bool simple_wallet::try_connect_to_daemon(bool silent, uint32_t* version) uint32_t version_ = 0; if (!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 (!silent) diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 5b9d398a9..c4d3856d4 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -63,8 +63,8 @@ namespace { static const int MAX_REFRESH_INTERVAL_MILLIS = 1000 * 60 * 1; // Default refresh interval when connected to remote node static const int DEFAULT_REMOTE_NODE_REFRESH_INTERVAL_MILLIS = 1000 * 10; - // Connection timeout 30 sec - static const int DEFAULT_CONNECTION_TIMEOUT_MILLIS = 1000 * 30; + // Connection timeout 20 sec + static const int DEFAULT_CONNECTION_TIMEOUT_MILLIS = 1000 * 20; std::string get_default_ringdb_path(cryptonote::network_type nettype) { @@ -2173,7 +2173,7 @@ bool WalletImpl::connectToDaemon() Wallet::ConnectionStatus WalletImpl::connected() const { 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); if (!m_is_connected) { diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index e8b349ca6..17ff0e44b 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -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.discrepancy = 0; + m_rpc_version = 0; m_node_rpc_proxy.invalidate(); } |