From 359656b970cd1d0f11ae50ef1d2c99854b2ca92e Mon Sep 17 00:00:00 2001 From: Anatol Date: Wed, 15 May 2019 19:06:24 +0300 Subject: [PATCH 1/3] #647 fixed crash during rescan --- wallet/unittests/wallet_test.cpp | 4 ++-- wallet/wallet_transaction.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wallet/unittests/wallet_test.cpp b/wallet/unittests/wallet_test.cpp index e752ab736..d1dc3b8c3 100644 --- a/wallet/unittests/wallet_test.cpp +++ b/wallet/unittests/wallet_test.cpp @@ -1979,7 +1979,7 @@ namespace { // create cold wallet - TestWalletRig privateSender("receiver", createReceiverWalletDB(true), f, true); + TestWalletRig privateReceiver("receiver", createReceiverWalletDB(true), f, true); } string publicPath = "receiver_public.db"; @@ -2014,7 +2014,7 @@ namespace TestWalletRig publicReceiver("public_receiver", publicDB, f, false, true); mainReactor->run(); - mainReactor->run(); // to allow receiver complete his transaction + mainReactor->run(); // to allow receiver complete this transaction } // hot -> cold diff --git a/wallet/wallet_transaction.cpp b/wallet/wallet_transaction.cpp index 6f6d9e9b7..5b57cc4c7 100644 --- a/wallet/wallet_transaction.cpp +++ b/wallet/wallet_transaction.cpp @@ -326,7 +326,7 @@ namespace beam { namespace wallet bool hasPeersInputsAndOutputs = builder.GetPeerInputsAndOutputs(); - if (!builder.LoadKernel() && !builder.HasKernelID()) + if (isSender && !builder.LoadKernel() || (!isSender && !builder.HasKernelID())) { if (!m_WalletDB->get_MasterKdf()) { From d35e732add898e79382f712f77deeb4b6087d7ca Mon Sep 17 00:00:00 2001 From: Anatol Date: Wed, 15 May 2019 19:52:44 +0300 Subject: [PATCH 2/3] removed branch name for mainnet --- ui/viewmodel/statusbar_view.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/viewmodel/statusbar_view.cpp b/ui/viewmodel/statusbar_view.cpp index 5a7b96431..c24c9f12f 100644 --- a/ui/viewmodel/statusbar_view.cpp +++ b/ui/viewmodel/statusbar_view.cpp @@ -69,10 +69,14 @@ int StatusbarViewModel::getNodeSyncProgress() const QString StatusbarViewModel::getBranchName() const { +#ifdef BEAM_MAINNET + return QString(); +#else if (BRANCH_NAME.empty()) return QString(); return QString::fromStdString(" (" + BRANCH_NAME + ")"); +#endif } QString StatusbarViewModel::getWalletStatusErrorMsg() const From bbcf8cb727db3c258aa36ecc490e7149ab2dfa50 Mon Sep 17 00:00:00 2001 From: Anatol Date: Wed, 15 May 2019 19:55:40 +0300 Subject: [PATCH 3/3] fixed warning --- wallet/wallet_transaction.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wallet/wallet_transaction.cpp b/wallet/wallet_transaction.cpp index 5b57cc4c7..e85898f8b 100644 --- a/wallet/wallet_transaction.cpp +++ b/wallet/wallet_transaction.cpp @@ -326,7 +326,8 @@ namespace beam { namespace wallet bool hasPeersInputsAndOutputs = builder.GetPeerInputsAndOutputs(); - if (isSender && !builder.LoadKernel() || (!isSender && !builder.HasKernelID())) + if ((isSender && !builder.LoadKernel()) + || (!isSender && !builder.HasKernelID())) { if (!m_WalletDB->get_MasterKdf()) {