From 62bb95b25f35fa435a5b53e5267b3ffa00bc52b0 Mon Sep 17 00:00:00 2001 From: Crypto City Date: Tue, 30 May 2023 16:51:28 +0000 Subject: [PATCH 1/2] wallet2: fix missing exceptions from failing wallet refresh --- src/wallet/wallet2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 63e87e52e..a9c53dfa0 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3632,6 +3632,7 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo { LOG_PRINT_L1("Another try pull_blocks (try_count=" << try_count << ")..."); first = true; + last = false; start_height = 0; blocks.clear(); parsed_blocks.clear(); From 835896ea24cefb42024bd492f2458fe8e1fc7f09 Mon Sep 17 00:00:00 2001 From: Crypto City Date: Tue, 30 May 2023 17:07:20 +0000 Subject: [PATCH 2/2] wallet2: do not lose exception in current thread on refresh --- src/wallet/wallet2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index a9c53dfa0..ee7b78f54 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3566,6 +3566,7 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo catch (const std::exception &e) { MERROR("Error parsing blocks: " << e.what()); + exception = std::current_exception(); error = true; } blocks_fetched += added_blocks;