From 8a97c4ba2a6f12eb54298251cf08e49f8896efb8 Mon Sep 17 00:00:00 2001 From: Chris Moore Date: Fri, 11 Sep 2015 12:16:28 -0700 Subject: [PATCH] Remove the 'weight' column from the coin control dialog. Weight is the same as 'amount' for staking coins. --- src/qt/coincontroldialog.cpp | 9 --------- src/qt/coincontroldialog.h | 1 - src/qt/forms/coincontroldialog.ui | 10 +--------- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index 4518f03697..20f9eb81fd 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -118,7 +118,6 @@ CoinControlDialog::CoinControlDialog(QWidget *parent) : ui->treeWidget->setColumnWidth(COLUMN_DATE, 110); ui->treeWidget->setColumnWidth(COLUMN_CONFIRMATIONS, 100); ui->treeWidget->setColumnWidth(COLUMN_AGE, 60); - ui->treeWidget->setColumnWidth(COLUMN_WEIGHT, 60); ui->treeWidget->setColumnWidth(COLUMN_PRIORITY, 100); ui->treeWidget->setColumnHidden(COLUMN_TXHASH, true); // store transacton hash in this column, but dont show it ui->treeWidget->setColumnHidden(COLUMN_VOUT_INDEX, true); // store vout index in this column, but dont show it @@ -627,7 +626,6 @@ void CoinControlDialog::updateView() double dPrioritySum = 0; int nChildren = 0; int nInputSum = 0; - int dWeight = 0; BOOST_FOREACH(const COutput& out, coins.second) { int nInputSize = 148; // 180 if uncompressed public key @@ -688,12 +686,6 @@ void CoinControlDialog::updateView() int age = floorf((GetTime() - out.tx->GetTxTime()) / (1440 * nTargetStakeSpacing)); itemOutput->setText(COLUMN_AGE, strPad(QString::number(age), 5, " ")); - // weight - int weight = floorf((GetTime() - out.tx->GetTxTime()) * out.tx->vout[out.i].nValue / BitcoinUnits::factor(BitcoinUnits::BTC) / (double)(1440 * nTargetStakeSpacing)); - if (weight < 0) weight = 0; - itemOutput->setText(COLUMN_WEIGHT, strPad(QString::number(weight), 5, " ")); - dWeight += weight; - // priority double dPriority = ((double)out.tx->vout[out.i].nValue / (nInputSize + 78)) * (out.nDepth+1); // 78 = 2 * 34 + 10 //itemOutput->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPriority)); @@ -730,7 +722,6 @@ void CoinControlDialog::updateView() itemWalletAddress->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum)); itemWalletAddress->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(nSum), 15, " ")); itemWalletAddress->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPrioritySum)); - itemWalletAddress->setText(COLUMN_WEIGHT, strPad(QString::number((int64_t)dWeight), 5, " ")); } } diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h index 2812d53a38..22f019d357 100644 --- a/src/qt/coincontroldialog.h +++ b/src/qt/coincontroldialog.h @@ -58,7 +58,6 @@ class CoinControlDialog : public QDialog COLUMN_DATE, COLUMN_CONFIRMATIONS, COLUMN_AGE, - COLUMN_WEIGHT, COLUMN_PRIORITY, COLUMN_TXHASH, COLUMN_VOUT_INDEX, diff --git a/src/qt/forms/coincontroldialog.ui b/src/qt/forms/coincontroldialog.ui index 916aed39e7..2525850fcd 100644 --- a/src/qt/forms/coincontroldialog.ui +++ b/src/qt/forms/coincontroldialog.ui @@ -84,14 +84,6 @@ Age in days - - - Weight - - - Weight - - Priority @@ -579,7 +571,7 @@ - Note: Age, Weight, and Priority are not taken into account during staking. + Note: Age and Priority are not taken into account during staking.