More economical fee estimates for RBF and RPC options to control #10589
Merged
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
cfaef69
remove default argument from GetMinimumFee
morcos d507c30
Introduce a fee estimate mode.
morcos e0738e3
remove default argument from estimateSmartFee
morcos f0bf33d
Change default fee estimation mode.
morcos f135923
Add RPC options for RBF, confirmation target, and conservative fee es…
morcos
Jump to file or symbol
Failed to load files and symbols.
| @@ -166,6 +166,8 @@ void SendCoinsDialog::setModel(WalletModel *_model) | ||
| connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(updateFeeSectionControls())); | ||
| connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(updateGlobalFeeVariables())); | ||
| connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels())); | ||
| + connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(updateSmartFeeLabel())); | ||
| + connect(ui->optInRBF, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels())); | ||
morcos
Contributor
|
||
| ui->customFee->setSingleStep(CWallet::GetRequiredFee(1000)); | ||
| updateFeeSectionControls(); | ||
| updateMinFeeLabel(); | ||
| @@ -652,7 +654,8 @@ void SendCoinsDialog::updateSmartFeeLabel() | ||
| int nBlocksToConfirm = ui->sliderSmartFee->maximum() - ui->sliderSmartFee->value() + 2; | ||
| FeeCalculation feeCalc; | ||
| - CFeeRate feeRate = ::feeEstimator.estimateSmartFee(nBlocksToConfirm, &feeCalc, ::mempool); | ||
| + bool conservative_estimate = CalculateEstimateType(FeeEstimateMode::UNSET, ui->optInRBF->isChecked()); | ||
| + CFeeRate feeRate = ::feeEstimator.estimateSmartFee(nBlocksToConfirm, &feeCalc, ::mempool, conservative_estimate); | ||
| if (feeRate <= CFeeRate(0)) // not enough data => minfee | ||
| { | ||
| ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), | ||
| @@ -827,6 +830,7 @@ void SendCoinsDialog::coinControlUpdateLabels() | ||
| } else { | ||
| CoinControlDialog::coinControl->nConfirmTarget = model->getDefaultConfirmTarget(); | ||
| } | ||
| + CoinControlDialog::coinControl->signalRbf = ui->optInRBF->isChecked(); | ||
| for(int i = 0; i < ui->entries->count(); ++i) | ||
| { | ||
Oops, something went wrong.
Cant comment there, but I believe you also need to move the default setting of optInRBF up a bunch here (about 10 lines below this (set default rbf checkbox state, or does that setting automagically result in calling these registrations?).