diff --git a/src/wallet/monero_wallet.cpp b/src/wallet/monero_wallet.cpp index d6da71f..751a7af 100644 --- a/src/wallet/monero_wallet.cpp +++ b/src/wallet/monero_wallet.cpp @@ -3040,11 +3040,15 @@ namespace monero { // skip if daemon is not connected or synced if (m_is_connected && is_daemon_synced()) { - // rescan blockchain if requested - if (rescan) m_w2->rescan_blockchain(false); + // lock is lost on is_daemon_synced() so syncing could be disabled + if (!m_syncing_thread_done) { - // sync wallet - if (!m_syncing_thread_done) result = sync_aux(start_height); // lock is lost on is_daemon_synced() so syncing could be disabled + // rescan blockchain if requested + if (rescan) m_w2->rescan_blockchain(false); + + // sync wallet + result = sync_aux(start_height); + } } } while (!rescan && (rescan = m_rescan_on_sync.exchange(false))); // repeat if not rescanned and rescan was requested return result;