From 2d2aadb493357ea4a4237243f0c2a886902ebd1a Mon Sep 17 00:00:00 2001 From: woodser Date: Sat, 14 Mar 2020 15:22:26 -0400 Subject: [PATCH] invoke on_sync_end() on refresh exception --- src/wallet/monero_wallet_core.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/monero_wallet_core.cpp b/src/wallet/monero_wallet_core.cpp index 037911c..eedd4a1 100644 --- a/src/wallet/monero_wallet_core.cpp +++ b/src/wallet/monero_wallet_core.cpp @@ -3348,9 +3348,9 @@ namespace monero { try { m_w2->refresh(m_w2->is_trusted_daemon(), sync_start_height, result.m_num_blocks_fetched, result.m_received_money, true); if (!m_is_synced) m_is_synced = true; - } catch (const exception& e) { - MERROR("Caught error refreshing m_w2: " << e.what()); - cout << "ERROR: caught error refreshing m_w2: " << e.what() << endl; + } catch (exception& e) { + m_w2_listener->on_sync_end(); // signal end of sync to reset listener's start and end heights + throw; } // find and save rings