Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/miner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,13 @@ class COrphan
//!
//! \return Always \false - suitable for returning from the call directly.
//!
bool BreakForNoCoins(CMinerStatus& status, const char* message)
bool BreakForNoCoins(CMinerStatus& status, const std::string& message)
{
LOCK(status.lock);

status.Clear();
status.ReasonNotStaking += _(message);
status.ReasonNotStaking += message;
status.ReasonNotStaking += "; ";

if (fDebug) {
LogPrintf("CreateCoinStake: %s", MinerStatus.ReasonNotStaking);
Expand Down Expand Up @@ -443,15 +444,15 @@ bool CreateCoinStake( CBlock &blocknew, CKey &key,
//Request all the coins here, check reserve later

if (BalanceToStake <= 0) {
return BreakForNoCoins(MinerStatus, "No coins; ");
return BreakForNoCoins(MinerStatus, _("No coins"));
} else if (!wallet.SelectCoinsForStaking(BalanceToStake*2, txnew.nTime, CoinsToStake, nValueIn)) {
return BreakForNoCoins(MinerStatus, "Waiting for coins to mature; ");
return BreakForNoCoins(MinerStatus, _("Waiting for coins to mature"));
}

BalanceToStake -= nReserveBalance;

if (BalanceToStake <= 0) {
return BreakForNoCoins(MinerStatus, "Entire balance reserved; ");
return BreakForNoCoins(MinerStatus, _("Entire balance reserved"));
}

if(fDebug2) LogPrintf("CreateCoinStake: Staking nTime/16= %d Bits= %u",
Expand Down
11 changes: 8 additions & 3 deletions src/qt/bitcoinstrings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Block Version"),
QT_TRANSLATE_NOOP("bitcoin-core", "Block creation options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Block not in index"),
QT_TRANSLATE_NOOP("bitcoin-core", "Block read failed"),
QT_TRANSLATE_NOOP("bitcoin-core", "Blocks Loaded"),
QT_TRANSLATE_NOOP("bitcoin-core", "Blocks Verified"),
QT_TRANSLATE_NOOP("bitcoin-core", "Boinc Mining"),
QT_TRANSLATE_NOOP("bitcoin-core", "Boinc Public Key"),
QT_TRANSLATE_NOOP("bitcoin-core", "Boinc Reward"),
Expand All @@ -146,6 +148,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Discover own IP address (default: 1 when list
QT_TRANSLATE_NOOP("bitcoin-core", "Done loading"),
QT_TRANSLATE_NOOP("bitcoin-core", "Duration"),
QT_TRANSLATE_NOOP("bitcoin-core", "ERROR"),
QT_TRANSLATE_NOOP("bitcoin-core", "Entire balance reserved"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading blkindex.dat"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet corrupted"),
Expand Down Expand Up @@ -200,7 +203,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Message Data"),
QT_TRANSLATE_NOOP("bitcoin-core", "Message Length"),
QT_TRANSLATE_NOOP("bitcoin-core", "Message Type"),
QT_TRANSLATE_NOOP("bitcoin-core", "Message"),
QT_TRANSLATE_NOOP("bitcoin-core", "Messate Type"),
QT_TRANSLATE_NOOP("bitcoin-core", "Miner: "),
QT_TRANSLATE_NOOP("bitcoin-core", "Mining"),
QT_TRANSLATE_NOOP("bitcoin-core", "Name"),
Expand All @@ -209,14 +211,16 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Network Date"),
QT_TRANSLATE_NOOP("bitcoin-core", "Neural Contract Binary Size"),
QT_TRANSLATE_NOOP("bitcoin-core", "Neural Hash"),
QT_TRANSLATE_NOOP("bitcoin-core", "No Attached Messages"),
QT_TRANSLATE_NOOP("bitcoin-core", "No coins; "),
QT_TRANSLATE_NOOP("bitcoin-core", "No coins"),
QT_TRANSLATE_NOOP("bitcoin-core", "No current polls"),
QT_TRANSLATE_NOOP("bitcoin-core", "Offline; "),
QT_TRANSLATE_NOOP("bitcoin-core", "Only connect to nodes in network <net> (IPv4, IPv6 or Tor)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Organization"),
QT_TRANSLATE_NOOP("bitcoin-core", "Out of rance exception while parsing Transaction Message -> "),
QT_TRANSLATE_NOOP("bitcoin-core", "Out of range exception while parsing Transaction Message -> "),
QT_TRANSLATE_NOOP("bitcoin-core", "Output extra debugging information. Implies all other -debug* options"),
QT_TRANSLATE_NOOP("bitcoin-core", "Output extra network debugging information"),
QT_TRANSLATE_NOOP("bitcoin-core", "POR Blocks Verified"),
QT_TRANSLATE_NOOP("bitcoin-core", "Password for JSON-RPC connections"),
QT_TRANSLATE_NOOP("bitcoin-core", "Please wait for new user wizard to start..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Prepend debug output with timestamp"),
Expand Down Expand Up @@ -275,6 +279,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Use the test network"),
QT_TRANSLATE_NOOP("bitcoin-core", "Username for JSON-RPC connections"),
QT_TRANSLATE_NOOP("bitcoin-core", "Verifying database integrity..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Vote"),
QT_TRANSLATE_NOOP("bitcoin-core", "Waiting for coins to mature"),
QT_TRANSLATE_NOOP("bitcoin-core", "Wallet %s resides outside data directory %s."),
QT_TRANSLATE_NOOP("bitcoin-core", "Wallet locked; "),
QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart Gridcoin to complete"),
Expand Down
Loading