extern map<uint256, CAlert> mapAlerts;
extern CCriticalSection cs_mapAlerts;
-extern string strMintMessage;
-extern string strMintWarning;
-
string GetWarnings(string strFor)
{
int nPriority = 0;
if (GetBoolArg("-testsafemode"))
strRPC = "test";
- // wallet lock warning for minting
- if (strMintWarning != "")
- {
- nPriority = 0;
- strStatusBar = strMintWarning;
- }
-
// Misc warnings like out of disk space and clock is wrong
if (strMiscWarning != "")
{
// BitcoinMiner
//
-string strMintMessage = "Stake miner suspended due to locked wallet.";
-string strMintWarning;
-
extern unsigned int nMinerSleep;
int static FormatHashBlocks(void* pbuffer, unsigned int len)
while (pwallet->IsLocked())
{
- strMintWarning = strMintMessage;
Sleep(1000);
if (fShutdown)
return;
return;
}
- strMintWarning = "";
-
//
// Create new block
//
// Trying to sign a block
if (pblock->SignBlock(*pwallet))
{
- strMintWarning = _("Stake generation: new block found!");
SetThreadPriority(THREAD_PRIORITY_NORMAL);
CheckStake(pblock.get(), *pwallet);
SetThreadPriority(THREAD_PRIORITY_LOWEST);
// Status bar notification icons
QFrame *frameBlocks = new QFrame();
frameBlocks->setContentsMargins(0,0,0,0);
- frameBlocks->setMinimumWidth(56);
- frameBlocks->setMaximumWidth(56);
+ frameBlocks->setMinimumWidth(72);
+ frameBlocks->setMaximumWidth(72);
QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
frameBlocksLayout->setContentsMargins(3,0,3,0);
frameBlocksLayout->setSpacing(3);
setEncryptionStatus(walletModel->getEncryptionStatus());
connect(walletModel, SIGNAL(encryptionStatusChanged(int)), this, SLOT(setEncryptionStatus(int)));
+ connect(walletModel, SIGNAL(encryptionStatusChanged(int)), this, SLOT(updateMining()));
// Balloon pop-up for new transaction
connect(walletModel->getTransactionTableModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
labelMiningIcon->setPixmap(QIcon(":/icons/mining_inactive").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
if (!clientModel->getNumConnections())
+ {
labelMiningIcon->setToolTip(tr("Wallet is offline"));
+ return;
+ }
if (walletModel->getEncryptionStatus() == WalletModel::Locked)
+ {
labelMiningIcon->setToolTip(tr("Wallet is locked"));
+ return;
+ }
if (clientModel->inInitialBlockDownload() || clientModel->getNumBlocksOfPeers() > clientModel->getNumBlocks())
+ {
labelMiningIcon->setToolTip(tr("Blockchain download is in progress"));
+ return;
+ }
uint64 nMinWeight = 0, nMaxWeight = 0, nTotalWeight = 0;
walletModel->getStakeWeight(nMinWeight, nMaxWeight, nTotalWeight);