Skip to content

Commit 40de49c

Browse files
committed
Merge pull request #5932
107d35b [Qt] add defaultConfirmTarget constant to sendcoinsdialog (Philip Kaufmann)
2 parents 7e0e7f8 + 107d35b commit 40de49c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/qt/sendcoinsdialog.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,12 +590,12 @@ void SendCoinsDialog::updateGlobalFeeVariables()
590590
{
591591
if (ui->radioSmartFee->isChecked())
592592
{
593-
nTxConfirmTarget = (int)25 - (int)std::max(0, std::min(24, ui->sliderSmartFee->value()));
593+
nTxConfirmTarget = defaultConfirmTarget - ui->sliderSmartFee->value();
594594
payTxFee = CFeeRate(0);
595595
}
596596
else
597597
{
598-
nTxConfirmTarget = 25;
598+
nTxConfirmTarget = defaultConfirmTarget;
599599
payTxFee = CFeeRate(ui->customFee->value());
600600
fPayAtLeastCustomFee = ui->radioCustomAtLeast->isChecked();
601601
}
@@ -629,7 +629,7 @@ void SendCoinsDialog::updateSmartFeeLabel()
629629
if(!model || !model->getOptionsModel())
630630
return;
631631

632-
int nBlocksToConfirm = (int)25 - (int)std::max(0, std::min(24, ui->sliderSmartFee->value()));
632+
int nBlocksToConfirm = defaultConfirmTarget - ui->sliderSmartFee->value();
633633
CFeeRate feeRate = mempool.estimateFee(nBlocksToConfirm);
634634
if (feeRate <= CFeeRate(0)) // not enough data => minfee
635635
{

src/qt/sendcoinsdialog.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ QT_BEGIN_NAMESPACE
2323
class QUrl;
2424
QT_END_NAMESPACE
2525

26+
const int defaultConfirmTarget = 25;
27+
2628
/** Dialog for sending bitcoins */
2729
class SendCoinsDialog : public QDialog
2830
{

0 commit comments

Comments
 (0)