mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
[Qt] add defaultConfirmTarget constant to sendcoinsdialog
- replaces some hard-coded values for the default confirmation target - also simplify code that is using the new constant
This commit is contained in:
parent
7e0e7f823f
commit
e656560edb
@ -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();
|
||||
}
|
||||
@ -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
|
||||
{
|
||||
|
@ -23,6 +23,8 @@ QT_BEGIN_NAMESPACE
|
||||
class QUrl;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
const int defaultConfirmTarget = 25;
|
||||
|
||||
/** Dialog for sending bitcoins */
|
||||
class SendCoinsDialog : public QDialog
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user