From dffe5da801512d3d4d0c8ffbfccaa1f2ad5aa481 Mon Sep 17 00:00:00 2001 From: zano build machine Date: Tue, 1 Sep 2020 23:00:19 +0300 Subject: [PATCH 01/10] test commit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f9a5ad5..6af4daa1 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Be sure to properly clone the repository: |--|--|--|--| | gcc (Linux) | 5.4.0 | 7.2.0 | 8.3.0 | | llvm/clang (Linux) | UNKNOWN | 7.0.1 | 8.0.0 | -| [MSVC](https://visualstudio.microsoft.com/downloads/) (Windows) | 2015 (14.0 update 1) | 2015 (14.0 update 3) | 2017 (15.5.7) | +| [MSVC](https://visualstudio.microsoft.com/downloads/) (Windows) | 2015 (14.0 update 1) | 2017 (15.5.7) | 2019 | | [XCode](https://developer.apple.com/downloads/) (macOS) | 7.3.1 | 9.2 | 9.2 | | [CMake](https://cmake.org/download/) | 2.8.6 | 3.15.5 | 3.15.5 | | [Boost](https://www.boost.org/users/download/) | 1.56 | 1.68 | 1.68 | From 37d835b7c3b0486fcf6bb4eca564a32f917bd2c2 Mon Sep 17 00:00:00 2001 From: zano build machine Date: Tue, 1 Sep 2020 23:33:30 +0300 Subject: [PATCH 02/10] === build number: 97 -> 98 === --- src/version.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h.in b/src/version.h.in index e0c0ac5e..8b0bfcb7 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -8,6 +8,6 @@ #define PROJECT_REVISION "7" #define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION -#define PROJECT_VERSION_BUILD_NO 97 +#define PROJECT_VERSION_BUILD_NO 98 #define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO) #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]" From 820e63f0985d851262bcc03c9f10a9661f0bc6b9 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Tue, 1 Sep 2020 23:30:18 +0200 Subject: [PATCH 03/10] fixed simplewallet.cpp --- src/simplewallet/simplewallet.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index c37fef0a..3770251a 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -756,8 +756,9 @@ bool simple_wallet::list_recent_transfers(const std::vector& args) std::vector unconfirmed; std::vector recent; uint64_t total = 0; - m_wallet->get_recent_transfers_history(recent, 0, 0, total); - m_wallet->get_unconfirmed_transfers(unconfirmed); + uint64_t last_index = 0; + m_wallet->get_recent_transfers_history(recent, 0, 0, total, last_index, false); + m_wallet->get_unconfirmed_transfers(unconfirmed, false); //workaround for missed fee success_msg_writer() << "Unconfirmed transfers: "; @@ -809,8 +810,9 @@ bool simple_wallet::export_recent_transfers(const std::vector& args std::vector unconfirmed; std::vector recent; uint64_t total = 0; - m_wallet->get_recent_transfers_history(recent, 0, 0, total); - m_wallet->get_unconfirmed_transfers(unconfirmed); + uint64_t last_index = 0; + m_wallet->get_recent_transfers_history(recent, 0, 0, total, last_index, false); + m_wallet->get_unconfirmed_transfers(unconfirmed, false); //workaround for missed fee stringstream ss; LOG_PRINT_GREEN("Generating text....", LOG_LEVEL_0); From 7ba0880eda7a0f02a8c6058024423079602fb3fd Mon Sep 17 00:00:00 2001 From: zano build machine Date: Wed, 2 Sep 2020 01:31:24 +0300 Subject: [PATCH 04/10] === build number: 98 -> 99 === --- src/version.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h.in b/src/version.h.in index 8b0bfcb7..83782efe 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -8,6 +8,6 @@ #define PROJECT_REVISION "7" #define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION -#define PROJECT_VERSION_BUILD_NO 98 +#define PROJECT_VERSION_BUILD_NO 99 #define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO) #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]" From 0baa6c6df3491e0ff8441afffe6627436d5ce2b5 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Wed, 2 Sep 2020 17:28:19 +0200 Subject: [PATCH 05/10] let's pretend this never happened --- src/wallet/wallet2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 7a31708b..d06c9020 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -4281,7 +4281,7 @@ bool wallet2::is_transfer_ready_to_go(const transfer_details& td, uint64_t fake_ void wallet2::wipeout_extra_if_needed(std::vector& transfer_history) { WLT_LOG_L0("Processing [wipeout_extra_if_needed]..."); - for (auto it = transfer_history.begin(); it != transfer_history.end(); ) + for (auto it = transfer_history.begin(); it != transfer_history.end(); it++ ) { if (it->height > 638000) { From e2a7d6a4fcb84af9e76fe64d4bdae4d15227e799 Mon Sep 17 00:00:00 2001 From: zano build machine Date: Wed, 2 Sep 2020 18:29:42 +0300 Subject: [PATCH 06/10] === build number: 99 -> 100 === --- src/version.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h.in b/src/version.h.in index 83782efe..57387f26 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -8,6 +8,6 @@ #define PROJECT_REVISION "7" #define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION -#define PROJECT_VERSION_BUILD_NO 99 +#define PROJECT_VERSION_BUILD_NO 100 #define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO) #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]" From e01e59df2440d5d3b20ef829ccf2edf15af1c5d1 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Fri, 4 Sep 2020 22:26:03 +0200 Subject: [PATCH 07/10] disabled tray notifications while wallet sync --- src/gui/qt-daemon/application/mainwindow.cpp | 5 +++++ src/wallet/view_iface.h | 2 ++ src/wallet/wallets_manager.cpp | 12 +++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/gui/qt-daemon/application/mainwindow.cpp b/src/gui/qt-daemon/application/mainwindow.cpp index 80777b98..bdd261eb 100644 --- a/src/gui/qt-daemon/application/mainwindow.cpp +++ b/src/gui/qt-daemon/application/mainwindow.cpp @@ -826,6 +826,11 @@ bool MainWindow::money_transfer(const view::transfer_event_info& tei) //don't show unconfirmed tx if (tei.ti.height == 0) return true; + if (tei.is_wallet_in_sync_process) + { + //don't show notification if it long sync process(mmight cause system freeze) + return true; + } auto amount_str = currency::print_money(tei.ti.amount); std::string title, msg; diff --git a/src/wallet/view_iface.h b/src/wallet/view_iface.h index 0443bde2..4dfbba80 100644 --- a/src/wallet/view_iface.h +++ b/src/wallet/view_iface.h @@ -356,6 +356,7 @@ public: uint64_t balance; uint64_t total_mined; uint64_t wallet_id; + bool is_wallet_in_sync_process; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(ti) @@ -363,6 +364,7 @@ public: KV_SERIALIZE(balance) KV_SERIALIZE(total_mined) KV_SERIALIZE(wallet_id) + KV_SERIALIZE(is_wallet_in_sync_process) END_KV_SERIALIZE_MAP() }; diff --git a/src/wallet/wallets_manager.cpp b/src/wallet/wallets_manager.cpp index 9aedac42..ccaca324 100644 --- a/src/wallet/wallets_manager.cpp +++ b/src/wallet/wallets_manager.cpp @@ -32,6 +32,13 @@ return API_RETURN_CODE_WALLET_WRONG_ID; \ auto& name = it->second.w; +#define GET_WALLET_OPTIONS_BY_ID_VOID_RET(wallet_id, name) \ + SHARED_CRITICAL_REGION_LOCAL(m_wallets_lock); \ + auto it = m_wallets.find(wallet_id); \ + if (it == m_wallets.end()) \ + return; \ + auto& name = it->second; + #ifdef MOBILE_WALLET_BUILD #define DAEMON_IDLE_UPDATE_TIME_MS 10000 #define TX_POOL_SCAN_INTERVAL 5 @@ -1763,12 +1770,15 @@ void wallets_manager::on_new_block(size_t wallet_id, uint64_t /*height*/, const } void wallets_manager::on_transfer2(size_t wallet_id, const tools::wallet_public::wallet_transfer_info& wti, uint64_t balance, uint64_t unlocked_balance, uint64_t total_mined) -{ +{ view::transfer_event_info tei = AUTO_VAL_INIT(tei); tei.ti = wti; tei.balance = balance; tei.unlocked_balance = unlocked_balance; tei.wallet_id = wallet_id; + + GET_WALLET_OPTIONS_BY_ID_VOID_RET(wallet_id, w); + tei.is_wallet_in_sync_process = w.long_refresh_in_progress; m_pview->money_transfer(tei); } void wallets_manager::on_pos_block_found(size_t wallet_id, const currency::block& b) From ab12f56ab47311c7248b9be374807f1f67bb3ce3 Mon Sep 17 00:00:00 2001 From: zano build machine Date: Fri, 4 Sep 2020 23:31:47 +0300 Subject: [PATCH 08/10] === build number: 100 -> 101 === --- src/version.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h.in b/src/version.h.in index 57387f26..823bf82c 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -8,6 +8,6 @@ #define PROJECT_REVISION "7" #define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION -#define PROJECT_VERSION_BUILD_NO 100 +#define PROJECT_VERSION_BUILD_NO 101 #define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO) #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]" From 9eb4fe92285d2313b6d26819a60fda3b5771cca2 Mon Sep 17 00:00:00 2001 From: zano build machine Date: Tue, 8 Sep 2020 23:06:45 +0300 Subject: [PATCH 09/10] === build number: 101 -> 102 === --- src/version.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h.in b/src/version.h.in index 823bf82c..de5f3276 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -8,6 +8,6 @@ #define PROJECT_REVISION "7" #define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION -#define PROJECT_VERSION_BUILD_NO 101 +#define PROJECT_VERSION_BUILD_NO 102 #define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO) #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]" From f50501eaab2c9e054de1c0bfa4e45c82ddb66183 Mon Sep 17 00:00:00 2001 From: zano build machine Date: Tue, 8 Sep 2020 23:07:10 +0300 Subject: [PATCH 10/10] === build number: 102 -> 103 === --- src/version.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h.in b/src/version.h.in index de5f3276..f873f50c 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -8,6 +8,6 @@ #define PROJECT_REVISION "7" #define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION -#define PROJECT_VERSION_BUILD_NO 102 +#define PROJECT_VERSION_BUILD_NO 103 #define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO) #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"