From ec638b1ce0d561a04c3d3aecbe71bdce3af1208a Mon Sep 17 00:00:00 2001 From: lateminer <9951982+lateminer@users.noreply.github.com> Date: Wed, 20 Sep 2023 22:33:24 +0200 Subject: [PATCH] qt, pos: Display a warning on GUI if unable to stake https://github.com/reddcoin-project/reddcoin-0.22/commit/f45aa527cd8b04a1b13687b2dbd2a3e349959a40 --- src/node/miner.cpp | 8 ++++---- src/warnings.cpp | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/node/miner.cpp b/src/node/miner.cpp index 9a68f2b33b..f911e7ad2e 100644 --- a/src/node/miner.cpp +++ b/src/node/miner.cpp @@ -612,10 +612,10 @@ void PoSMiner(std::shared_ptr pwallet, NodeContext& m_node) LogPrintf("Set proof-of-stake timeout: %ums for %u UTXOs\n", pos_timio, vCoins.size()); } - std::string strMintMessage = _("Info: Staking suspended due to locked wallet.").translated; - std::string strMintSyncMessage = _("Info: Staking suspended while synchronizing wallet.").translated; - std::string strMintDisabledMessage = _("Info: Staking disabled by 'nominting' option.").translated; - std::string strMintBlockMessage = _("Info: Staking suspended due to block creation failure.").translated; + std::string strMintMessage = _("Info: Staking suspended due to locked wallet").translated; + std::string strMintSyncMessage = _("Info: Staking suspended while synchronizing wallet").translated; + std::string strMintDisabledMessage = _("Info: Staking disabled by 'nostaking' option").translated; + std::string strMintBlockMessage = _("Info: Staking suspended due to block creation failure").translated; std::string strMintEmpty = ""; if (!gArgs.GetBoolArg("-staking", DEFAULT_STAKE)) { diff --git a/src/warnings.cpp b/src/warnings.cpp index a04ccff1bb..a15043216a 100644 --- a/src/warnings.cpp +++ b/src/warnings.cpp @@ -43,6 +43,13 @@ bilingual_str GetWarnings(bool verbose) warnings_verbose.emplace_back(warnings_concise); } + // Wallet warnings for staking + if (strMintWarning != "") + { + warnings_concise = Untranslated(strMintWarning); + warnings_verbose.emplace_back(warnings_concise); + } + // Misc warnings like out of disk space and clock is wrong if (!g_misc_warnings.empty()) { warnings_concise = g_misc_warnings;