Skip to content

Commit

Permalink
Merge pull request #5932
Browse files Browse the repository at this point in the history
107d35b [Qt] add defaultConfirmTarget constant to sendcoinsdialog (Philip Kaufmann)
  • Loading branch information
laanwj committed May 12, 2015
2 parents 7e0e7f8 + 107d35b commit 40de49c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qt/sendcoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,12 +590,12 @@ void SendCoinsDialog::updateGlobalFeeVariables()
{
if (ui->radioSmartFee->isChecked())
{
nTxConfirmTarget = (int)25 - (int)std::max(0, std::min(24, ui->sliderSmartFee->value()));
nTxConfirmTarget = defaultConfirmTarget - ui->sliderSmartFee->value();
payTxFee = CFeeRate(0);
}
else
{
nTxConfirmTarget = 25;
nTxConfirmTarget = defaultConfirmTarget;
payTxFee = CFeeRate(ui->customFee->value());
fPayAtLeastCustomFee = ui->radioCustomAtLeast->isChecked();
}
Expand Down Expand Up @@ -629,7 +629,7 @@ void SendCoinsDialog::updateSmartFeeLabel()
if(!model || !model->getOptionsModel())
return;

int nBlocksToConfirm = (int)25 - (int)std::max(0, std::min(24, ui->sliderSmartFee->value()));
int nBlocksToConfirm = defaultConfirmTarget - ui->sliderSmartFee->value();
CFeeRate feeRate = mempool.estimateFee(nBlocksToConfirm);
if (feeRate <= CFeeRate(0)) // not enough data => minfee
{
Expand Down
2 changes: 2 additions & 0 deletions src/qt/sendcoinsdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ QT_BEGIN_NAMESPACE
class QUrl;
QT_END_NAMESPACE

const int defaultConfirmTarget = 25;

/** Dialog for sending bitcoins */
class SendCoinsDialog : public QDialog
{
Expand Down

0 comments on commit 40de49c

Please sign in to comment.