Skip to content

Commit

Permalink
[Cleanup][Qt] remove COLUMN_PRECOMPUTE from zpivcontroldialog
Browse files Browse the repository at this point in the history
Github-Pull: #1237
Rebased-From: 520284e
  • Loading branch information
random-zebra authored and Fuzzbawls committed Jan 11, 2020
1 parent 3394078 commit 4de0dec
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
15 changes: 1 addition & 14 deletions src/qt/zpivcontroldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,6 @@ void ZPivControlDialog::updateList()
itemMint->setText(COLUMN_CONFIRMATIONS, QString::number(nConfirmations));
itemMint->setData(COLUMN_CONFIRMATIONS, Qt::UserRole, QVariant((qlonglong) nConfirmations));

{
LOCK(pwalletMain->zpivTracker->cs_spendcache);

CoinWitnessData *witnessData = pwalletMain->zpivTracker->GetSpendCache(mint.hashStake);
if (witnessData->nHeightAccStart > 0 && witnessData->nHeightAccEnd > 0) {
int nPercent = std::max(0, std::min(100, (int)((double)(witnessData->nHeightAccEnd - witnessData->nHeightAccStart) / (double)(nBestHeight - witnessData->nHeightAccStart - 220) * 100)));
QString percent = QString::number(nPercent) + QString("%");
itemMint->setText(COLUMN_PRECOMPUTE, percent);
} else {
itemMint->setText(COLUMN_PRECOMPUTE, QString("0%"));
}
}

// check for maturity
// Always mature, public spends doesn't require any new accumulation.
bool isMature = true;
Expand All @@ -164,7 +151,7 @@ void ZPivControlDialog::updateList()
if(nConfirmations < Params().Zerocoin_MintRequiredConfirmations())
strReason = strprintf("Needs %d more confirmations", Params().Zerocoin_MintRequiredConfirmations() - nConfirmations);
else if (model->getEncryptionStatus() == WalletModel::EncryptionStatus::Locked)
strReason = "Your wallet is locked. Impossible to precompute or spend zPIV.";
strReason = "Your wallet is locked. Impossible to spend zPIV.";
else if (!mint.isSeedCorrect)
strReason = "The zPIV seed used to mint this zPIV is not the same as currently hold in the wallet";
else
Expand Down
1 change: 0 additions & 1 deletion src/qt/zpivcontroldialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class ZPivControlDialog : public QDialog
COLUMN_DENOMINATION,
COLUMN_PUBCOIN,
COLUMN_VERSION,
COLUMN_PRECOMPUTE,
COLUMN_CONFIRMATIONS,
COLUMN_ISSPENDABLE
};
Expand Down

0 comments on commit 4de0dec

Please sign in to comment.