diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-01-15 23:44:32 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-01-15 23:44:32 -0500 |
commit | d01f31460ed3dbabc5f41da0e143225580a4c966 (patch) | |
tree | 8836b8ff414ec85874a458f0024ba2c56e73e871 /src/simplewallet | |
parent | Merge pull request #7112 (diff) | |
parent | simplewallet: don't complain about connecting to the daemon when offline (diff) | |
download | monero-d01f31460ed3dbabc5f41da0e143225580a4c966.tar.xz |
Merge pull request #7113
7f30c49 simplewallet: don't complain about connecting to the daemon when offline (moneromooo-monero)
Diffstat (limited to 'src/simplewallet')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 0635520c6..dfd6adf3a 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -4765,9 +4765,14 @@ bool simple_wallet::try_connect_to_daemon(bool silent, uint32_t* version) if (!m_wallet->check_connection(version)) { if (!silent) - fail_msg_writer() << tr("wallet failed to connect to daemon: ") << m_wallet->get_daemon_address() << ". " << - tr("Daemon either is not started or wrong port was passed. " - "Please make sure daemon is running or change the daemon address using the 'set_daemon' command."); + { + if (m_wallet->is_offline()) + fail_msg_writer() << tr("wallet failed to connect to daemon, because it is set to offline mode"); + else + fail_msg_writer() << tr("wallet failed to connect to daemon: ") << m_wallet->get_daemon_address() << ". " << + tr("Daemon either is not started or wrong port was passed. " + "Please make sure daemon is running or change the daemon address using the 'set_daemon' command."); + } return false; } if (!m_allow_mismatched_daemon_version && ((*version >> 16) != CORE_RPC_VERSION_MAJOR)) @@ -9298,7 +9303,7 @@ bool simple_wallet::run() refresh_main(0, ResetNone, true); - m_auto_refresh_enabled = m_wallet->auto_refresh(); + m_auto_refresh_enabled = !m_wallet->is_offline() && m_wallet->auto_refresh(); m_idle_thread = boost::thread([&]{wallet_idle_thread();}); message_writer(console_color_green, false) << "Background refresh thread started"; |