From 00052aa15b2f0f9531cf529188f93d4892b2f0a2 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Fri, 9 Aug 2019 02:08:41 +0300 Subject: [PATCH] Drop rbf-related parts --- src/qt/coincontroldialog.cpp | 2 +- src/qt/sendcoinsdialog.cpp | 5 +---- src/qt/walletmodel.cpp | 1 - src/wallet/rpcwallet.cpp | 8 +------- src/wallet/wallet.cpp | 5 ++--- src/wallet/wallet.h | 2 +- 6 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index 758fcb94d..892047bd1 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -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) diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index b943067bc..441de1c46 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -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) { diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index c11e8695c..9ec2dacb4 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -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 diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 9f762ca1a..b3c3b0787 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -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"} }, diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e912a33c1..d708d531a 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3779,7 +3779,7 @@ bool CWallet::CreateTransaction(const std::vector& 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: diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index c53d268ae..98e013999 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1309,6 +1309,6 @@ public: } }; -bool CalculateEstimateType(FeeEstimateMode mode, bool opt_in_rbf); +bool CalculateEstimateType(FeeEstimateMode mode); #endif // BITCOIN_WALLET_WALLET_H