Drop rbf-related parts
This commit is contained in:
parent
00c4046e55
commit
00052aa15b
@ -537,7 +537,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
||||
else nBytesInputs += 148;
|
||||
}
|
||||
|
||||
bool conservative_estimate = CalculateEstimateType(FeeEstimateMode::UNSET, coinControl->signalRbf);
|
||||
bool conservative_estimate = CalculateEstimateType(FeeEstimateMode::UNSET);
|
||||
|
||||
// calculation
|
||||
if (nQuantity > 0)
|
||||
|
@ -223,8 +223,6 @@ 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()));
|
||||
ui->customFee->setSingleStep(CWallet::GetRequiredFee(1000));
|
||||
updateFeeSectionControls();
|
||||
updateMinFeeLabel();
|
||||
@ -766,7 +764,7 @@ void SendCoinsDialog::updateSmartFeeLabel()
|
||||
|
||||
int nBlocksToConfirm = getConfTargetForIndex(ui->confTargetSelector->currentIndex());
|
||||
FeeCalculation feeCalc;
|
||||
bool conservative_estimate = CalculateEstimateType(FeeEstimateMode::UNSET, ui->optInRBF->isChecked());
|
||||
bool conservative_estimate = CalculateEstimateType(FeeEstimateMode::UNSET);
|
||||
CFeeRate feeRate = ::feeEstimator.estimateSmartFee(nBlocksToConfirm, &feeCalc, ::mempool, conservative_estimate);
|
||||
if (feeRate <= CFeeRate(0)) // not enough data => minfee
|
||||
{
|
||||
@ -939,7 +937,6 @@ void SendCoinsDialog::coinControlUpdateLabels()
|
||||
} else {
|
||||
CoinControlDialog::coinControl->nConfirmTarget = model->getDefaultConfirmTarget();
|
||||
}
|
||||
CoinControlDialog::coinControl->signalRbf = ui->optInRBF->isChecked();
|
||||
|
||||
for(int i = 0; i < ui->entries->count(); ++i)
|
||||
{
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "keystore.h"
|
||||
#include "validation.h"
|
||||
#include "net.h" // for g_connman
|
||||
#include "policy/fees.h"
|
||||
#include "sync.h"
|
||||
#include "ui_interface.h"
|
||||
#include "util.h" // for GetBoolArg
|
||||
|
@ -476,9 +476,6 @@ UniValue sendtoaddress(const JSONRPCRequest& request)
|
||||
}
|
||||
|
||||
CCoinControl coin_control;
|
||||
if (request.params.size() > 5 && !request.params[5].isNull()) {
|
||||
coin_control.signalRbf = request.params[5].get_bool();
|
||||
}
|
||||
|
||||
if (request.params.size() > 6 && !request.params[6].isNull()) {
|
||||
coin_control.nConfirmTarget = request.params[6].get_int();
|
||||
@ -1050,9 +1047,6 @@ UniValue sendmany(const JSONRPCRequest& request)
|
||||
subtractFeeFrom = request.params[5].get_array();
|
||||
|
||||
CCoinControl coin_control;
|
||||
if (request.params.size() > 5 && !request.params[5].isNull()) {
|
||||
coin_control.signalRbf = request.params[5].get_bool();
|
||||
}
|
||||
|
||||
if (request.params.size() > 6 && !request.params[6].isNull()) {
|
||||
coin_control.nConfirmTarget = request.params[6].get_int();
|
||||
@ -3193,7 +3187,7 @@ static const CRPCCommand commands[] =
|
||||
{ "wallet", "lockunspent", &lockunspent, true, {"unlock","transactions"} },
|
||||
{ "wallet", "move", &movecmd, false, {"fromaccount","toaccount","amount","minconf","comment"} },
|
||||
{ "wallet", "sendfrom", &sendfrom, false, {"fromaccount","toaddress","amount","minconf","addlocked","comment","comment_to"} },
|
||||
{ "wallet", "sendmany", &sendmany, false, {"fromaccount","amounts","minconf","addlocked","comment","subtractfeefrom","replaceable","conf_target","estimate_mode"} },
|
||||
{ "wallet", "sendmany", &sendmany, false, {"fromaccount","amounts","minconf","addlocked","comment","subtractfeefrom","conf_target","estimate_mode"} },
|
||||
{ "wallet", "sendtoaddress", &sendtoaddress, false, {"address","amount","comment","comment_to","subtractfeefromamount","conf_target","estimate_mode"} },
|
||||
{ "wallet", "setaccount", &setaccount, true, {"address","account"} },
|
||||
{ "wallet", "settxfee", &settxfee, true, {"amount"} },
|
||||
|
@ -3779,7 +3779,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT
|
||||
currentConfirmationTarget = coinControl->nConfirmTarget;
|
||||
|
||||
// Allow to override the default fee estimate mode over the CoinControl instance
|
||||
bool conservative_estimate = CalculateEstimateType(coinControl ? coinControl->m_fee_mode : FeeEstimateMode::UNSET, rbf);
|
||||
bool conservative_estimate = CalculateEstimateType(coinControl ? coinControl->m_fee_mode : FeeEstimateMode::UNSET);
|
||||
|
||||
CAmount nFeeNeeded = GetMinimumFee(nBytes, currentConfirmationTarget, ::mempool, ::feeEstimator, &feeCalc, false /* ignoreGlobalPayTxFee */, conservative_estimate);
|
||||
if (coinControl && coinControl->fOverrideFeeRate)
|
||||
@ -5563,10 +5563,9 @@ bool CMerkleTx::AcceptToMemoryPool(const CAmount& nAbsurdFee, CValidationState&
|
||||
return ::AcceptToMemoryPool(mempool, state, tx, true, nullptr, false, nAbsurdFee);
|
||||
}
|
||||
|
||||
bool CalculateEstimateType(FeeEstimateMode mode, bool opt_in_rbf) {
|
||||
bool CalculateEstimateType(FeeEstimateMode mode) {
|
||||
switch (mode) {
|
||||
case FeeEstimateMode::UNSET:
|
||||
return !opt_in_rbf; // Allow for lower fees if RBF is an option
|
||||
case FeeEstimateMode::CONSERVATIVE:
|
||||
return true;
|
||||
case FeeEstimateMode::ECONOMICAL:
|
||||
|
@ -1309,6 +1309,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
bool CalculateEstimateType(FeeEstimateMode mode, bool opt_in_rbf);
|
||||
bool CalculateEstimateType(FeeEstimateMode mode);
|
||||
|
||||
#endif // BITCOIN_WALLET_WALLET_H
|
||||
|
Loading…
Reference in New Issue
Block a user