diff --git a/src/darksend.h b/src/darksend.h index 92b860296..f0a439e13 100644 --- a/src/darksend.h +++ b/src/darksend.h @@ -332,7 +332,7 @@ public: to behave themselves. If they don't it takes their money. */ cachedLastSuccess = 0; - cachedNumBlocks = 0; + cachedNumBlocks = std::numeric_limits::max(); unitTest = false; txCollateral = CMutableTransaction(); minBlockSpacing = 0; diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index 7648e57b1..d1b30399d 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -251,7 +251,7 @@ void OptionsDialog::on_resetButton_clicked() void OptionsDialog::on_okButton_clicked() { mapper->submit(); - darkSendPool.cachedNumBlocks = 0; + darkSendPool.cachedNumBlocks = std::numeric_limits::max(); pwalletMain->MarkDirty(); accept(); } diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp index 875b8fd74..e5d19950a 100644 --- a/src/qt/overviewpage.cpp +++ b/src/qt/overviewpage.cpp @@ -517,7 +517,7 @@ void OverviewPage::toggleDarksend(){ if(!ctx.isValid()) { //unlock was cancelled - darkSendPool.cachedNumBlocks = 0; + darkSendPool.cachedNumBlocks = std::numeric_limits::max(); QMessageBox::warning(this, tr("Darksend"), tr("Wallet is locked and user declined to unlock. Disabling Darksend."), QMessageBox::Ok, QMessageBox::Ok); @@ -528,8 +528,8 @@ void OverviewPage::toggleDarksend(){ } - darkSendPool.cachedNumBlocks = 0; fEnableDarksend = !fEnableDarksend; + darkSendPool.cachedNumBlocks = std::numeric_limits::max(); if(!fEnableDarksend){ ui->toggleDarksend->setText(tr("Start Darksend Mixing"));