diff --git a/doc/release-notes.md b/doc/release-notes.md --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -5,3 +5,4 @@ This release includes the following features and fixes: - Remove deprecated `estimatepriority` RPC. - Remove deprecated `estimatesmartpriority` RPC. + - Remove support for `-sendfreetransactions`. diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -554,12 +554,6 @@ std::max(mempoolEstimatePriority, AllowFreeThreshold()); fAllowFree = (dPriority >= dPriorityNeeded); - if (fSendFreeTransactions) { - if (fAllowFree && nBytes <= MAX_FREE_TRANSACTION_CREATE_SIZE) { - nPayFee = Amount(0); - } - } - if (nPayAmount > Amount(0)) { nChange = nAmount - nPayAmount; if (!CoinControlDialog::fSubtractFeeFromAmount) nChange -= nPayFee; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -39,7 +39,6 @@ extern CFeeRate payTxFee; extern unsigned int nTxConfirmTarget; extern bool bSpendZeroConfChange; -extern bool fSendFreeTransactions; static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000; //! -paytxfee default @@ -56,8 +55,6 @@ static const Amount MIN_FINAL_CHANGE = MIN_CHANGE / 2; //! Default for -spendzeroconfchange static const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true; -//! Default for -sendfreetransactions -static const bool DEFAULT_SEND_FREE_TRANSACTIONS = false; //! Default for -walletrejectlongchains static const bool DEFAULT_WALLET_REJECT_LONG_CHAINS = false; //! -txconfirmtarget default diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -43,7 +43,6 @@ CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE); unsigned int nTxConfirmTarget = DEFAULT_TX_CONFIRM_TARGET; bool bSpendZeroConfChange = DEFAULT_SPEND_ZEROCONF_CHANGE; -bool fSendFreeTransactions = DEFAULT_SEND_FREE_TRANSACTIONS; const char *DEFAULT_WALLET_DAT = "wallet.dat"; const uint32_t BIP32_HARDENED_KEY_LIMIT = 0x80000000; @@ -4029,13 +4028,6 @@ strUsage += HelpMessageOpt( "-salvagewallet", _("Attempt to recover private keys from a corrupt wallet on startup")); - if (showDebug) { - strUsage += HelpMessageOpt( - "-sendfreetransactions", - strprintf(_("Send transactions as zero-fee transactions if " - "possible (default: %d)"), - DEFAULT_SEND_FREE_TRANSACTIONS)); - } strUsage += HelpMessageOpt("-spendzeroconfchange", @@ -4493,14 +4485,6 @@ gArgs.GetArg("-txconfirmtarget", DEFAULT_TX_CONFIRM_TARGET); bSpendZeroConfChange = gArgs.GetBoolArg("-spendzeroconfchange", DEFAULT_SPEND_ZEROCONF_CHANGE); - fSendFreeTransactions = gArgs.GetBoolArg("-sendfreetransactions", - DEFAULT_SEND_FREE_TRANSACTIONS); - - if (fSendFreeTransactions && - gArgs.GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) <= 0) { - return InitError("Creation of free transactions with their relay " - "disabled is not supported."); - } return true; }