Merge #946: Fix extra warning about low keys on wallet encryption
5d62e4f Fix extra warning about low keys on wallet encryption
This commit is contained in:
parent
7d55e623a8
commit
66de5b082a
@ -461,7 +461,25 @@ void OverviewPage::privateSendStatus()
|
||||
}
|
||||
ui->labelPrivateSendEnabled->setToolTip(strKeysLeftText);
|
||||
|
||||
if (!fEnablePrivateSend) {
|
||||
if (nBestHeight != darkSendPool.nCachedNumBlocks) {
|
||||
darkSendPool.nCachedNumBlocks = nBestHeight;
|
||||
updatePrivateSendProgress();
|
||||
}
|
||||
|
||||
ui->labelPrivateSendLastMessage->setText("");
|
||||
ui->togglePrivateSend->setText(tr("Start Mixing"));
|
||||
|
||||
QString strEnabled = tr("Disabled");
|
||||
// Show how many keys left in advanced PS UI mode only
|
||||
if (fShowAdvancedPSUI) strEnabled += ", " + strKeysLeftText;
|
||||
ui->labelPrivateSendEnabled->setText(strEnabled);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Warn user that wallet is running out of keys
|
||||
// NOTE: we do NOT warn user and do NOT create autobackups if mixing is not running
|
||||
if (nWalletBackups > 0 && pwalletMain->nKeysLeftSinceAutoBackup < PRIVATESEND_KEYS_THRESHOLD_WARNING) {
|
||||
QSettings settings;
|
||||
if(settings.value("fLowKeysWarning").toBool()) {
|
||||
@ -520,18 +538,6 @@ void OverviewPage::privateSendStatus()
|
||||
ui->labelPrivateSendEnabled->setToolTip(strWarning);
|
||||
}
|
||||
|
||||
if(!fEnablePrivateSend) {
|
||||
if(nBestHeight != darkSendPool.nCachedNumBlocks) {
|
||||
darkSendPool.nCachedNumBlocks = nBestHeight;
|
||||
updatePrivateSendProgress();
|
||||
}
|
||||
|
||||
ui->labelPrivateSendLastMessage->setText("");
|
||||
ui->togglePrivateSend->setText(tr("Start Mixing"));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// check darksend status and unlock if needed
|
||||
if(nBestHeight != darkSendPool.nCachedNumBlocks) {
|
||||
// Balance and number of transactions might have changed
|
||||
|
@ -3658,6 +3658,7 @@ bool CWallet::NewKeyPool()
|
||||
BOOST_FOREACH(int64_t nIndex, setKeyPool)
|
||||
walletdb.ErasePool(nIndex);
|
||||
setKeyPool.clear();
|
||||
fEnablePrivateSend = false;
|
||||
pwalletMain->nKeysLeftSinceAutoBackup = 0;
|
||||
|
||||
if (IsLocked())
|
||||
|
Loading…
Reference in New Issue
Block a user