diff --git a/doc/man/bitcoin-qt.1 b/doc/man/bitcoin-qt.1 index 5aa2bb62d3..c6fd5afd23 100644 --- a/doc/man/bitcoin-qt.1 +++ b/doc/man/bitcoin-qt.1 @@ -314,10 +314,6 @@ confirmation on average within n blocks (default: 6) Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start (default: 1) .HP -\fB\-walletrbf\fR -.IP -Send transactions with full\-RBF opt\-in enabled (default: 0) -.HP \fB\-upgradewallet\fR .IP Upgrade wallet to latest format on startup diff --git a/doc/man/bitcoind.1 b/doc/man/bitcoind.1 index 68e05270ad..f7508a9d9e 100644 --- a/doc/man/bitcoind.1 +++ b/doc/man/bitcoind.1 @@ -319,10 +319,6 @@ confirmation on average within n blocks (default: 6) Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start (default: 1) .HP -\fB\-walletrbf\fR -.IP -Send transactions with full\-RBF opt\-in enabled (default: 0) -.HP \fB\-upgradewallet\fR .IP Upgrade wallet to latest format on startup diff --git a/qa/rpc-tests/bumpfee.py b/qa/rpc-tests/bumpfee.py index c7b744d9dd..7403264b57 100755 --- a/qa/rpc-tests/bumpfee.py +++ b/qa/rpc-tests/bumpfee.py @@ -27,7 +27,7 @@ class BumpFeeTest(BitcoinTestFramework): self.setup_clean_chain = True def setup_network(self, split=False): - extra_args = [["-debug", "-prematurewitness", "-walletprematurewitness", "-walletrbf={}".format(i)] + extra_args = [["-debug", "-prematurewitness", "-walletprematurewitness"] for i in range(self.num_nodes)] self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 50f2bde08a..a3d470fc69 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -44,7 +44,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; -bool fWalletRbf = DEFAULT_WALLET_RBF; const char * DEFAULT_WALLET_DAT = "wallet.dat"; const uint32_t BIP32_HARDENED_KEY_LIMIT = 0x80000000; @@ -2997,15 +2996,8 @@ bool CWallet::CreateTransaction(const vector& vecSend, CWalletTx& wt // // Note how the sequence number is set to non-maxint so that // the nLockTime set above actually works. - // - // BIP125 defines opt-in RBF as any nSequence < maxint-1, so - // we use the highest possible value in that range (maxint-2) - // to avoid conflicting with other possible uses of nSequence, - // and in the spirit of "smallest possible change from prior - // behavior." for (const auto& coin : setCoins) { - txNew.vin.push_back(CTxIn(coin.first->GetHash(),coin.second,CScript(), - std::numeric_limits::max() - (fWalletRbf ? 2 : 1))); + txNew.vin.push_back(CTxIn(coin.first->GetHash(),coin.second,CScript(), std::numeric_limits::max() - 1)); if (reissuanceToken && coin.first->GetOutputAsset(coin.second) == *reissuanceToken) { reissuanceIndex = txNew.vin.size()-1; @@ -4155,7 +4147,6 @@ std::string CWallet::GetWalletHelpString(bool showDebug) strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), DEFAULT_SPEND_ZEROCONF_CHANGE)); strUsage += HelpMessageOpt("-txconfirmtarget=", strprintf(_("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)"), DEFAULT_TX_CONFIRM_TARGET)); strUsage += HelpMessageOpt("-usehd", _("Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start") + " " + strprintf(_("(default: %u)"), DEFAULT_USE_HD_WALLET)); - strUsage += HelpMessageOpt("-walletrbf", strprintf(_("Send transactions with full-RBF opt-in enabled (default: %u)"), DEFAULT_WALLET_RBF)); strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format on startup")); strUsage += HelpMessageOpt("-wallet=", _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), DEFAULT_WALLET_DAT)); strUsage += HelpMessageOpt("-walletbroadcast", _("Make the wallet broadcast transactions") + " " + strprintf(_("(default: %u)"), DEFAULT_WALLETBROADCAST)); @@ -4471,7 +4462,6 @@ bool CWallet::ParameterInteraction() nTxConfirmTarget = GetArg("-txconfirmtarget", DEFAULT_TX_CONFIRM_TARGET); bSpendZeroConfChange = GetBoolArg("-spendzeroconfchange", DEFAULT_SPEND_ZEROCONF_CHANGE); fSendFreeTransactions = GetBoolArg("-sendfreetransactions", DEFAULT_SEND_FREE_TRANSACTIONS); - fWalletRbf = GetBoolArg("-walletrbf", DEFAULT_WALLET_RBF); if (fSendFreeTransactions && GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) <= 0) return InitError("Creation of free transactions with their relay disabled is not supported."); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index c4a4d23cfb..37911914eb 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -41,7 +41,6 @@ extern CFeeRate payTxFee; extern unsigned int nTxConfirmTarget; extern bool bSpendZeroConfChange; extern bool fSendFreeTransactions; -extern bool fWalletRbf; static const unsigned int DEFAULT_KEYPOOL_SIZE = 100; //! -paytxfee default @@ -64,8 +63,6 @@ static const bool DEFAULT_SEND_FREE_TRANSACTIONS = false; static const bool DEFAULT_WALLET_REJECT_LONG_CHAINS = false; //! -txconfirmtarget default static const unsigned int DEFAULT_TX_CONFIRM_TARGET = 6; -//! -walletrbf default -static const bool DEFAULT_WALLET_RBF = true; //! Largest (in bytes) free transaction we're willing to create static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000; static const bool DEFAULT_WALLETBROADCAST = true;