Skip to content

Commit b2bbc67

Browse files
committed
Merge #250: Wallet: Remove -walletrbf option
ef368b0 Wallet: Remove -walletrbf option (Jorge Timón)
2 parents f372a01 + ef368b0 commit b2bbc67

File tree

5 files changed

+2
-23
lines changed

5 files changed

+2
-23
lines changed

doc/man/bitcoin-qt.1

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,6 @@ confirmation on average within n blocks (default: 6)
314314
Use hierarchical deterministic key generation (HD) after BIP32. Only has
315315
effect during wallet creation/first start (default: 1)
316316
.HP
317-
\fB\-walletrbf\fR
318-
.IP
319-
Send transactions with full\-RBF opt\-in enabled (default: 0)
320-
.HP
321317
\fB\-upgradewallet\fR
322318
.IP
323319
Upgrade wallet to latest format on startup

doc/man/bitcoind.1

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,6 @@ confirmation on average within n blocks (default: 6)
319319
Use hierarchical deterministic key generation (HD) after BIP32. Only has
320320
effect during wallet creation/first start (default: 1)
321321
.HP
322-
\fB\-walletrbf\fR
323-
.IP
324-
Send transactions with full\-RBF opt\-in enabled (default: 0)
325-
.HP
326322
\fB\-upgradewallet\fR
327323
.IP
328324
Upgrade wallet to latest format on startup

qa/rpc-tests/bumpfee.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def __init__(self):
2727
self.setup_clean_chain = True
2828

2929
def setup_network(self, split=False):
30-
extra_args = [["-debug", "-prematurewitness", "-walletprematurewitness", "-walletrbf={}".format(i)]
30+
extra_args = [["-debug", "-prematurewitness", "-walletprematurewitness"]
3131
for i in range(self.num_nodes)]
3232
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args)
3333

src/wallet/wallet.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
4444
unsigned int nTxConfirmTarget = DEFAULT_TX_CONFIRM_TARGET;
4545
bool bSpendZeroConfChange = DEFAULT_SPEND_ZEROCONF_CHANGE;
4646
bool fSendFreeTransactions = DEFAULT_SEND_FREE_TRANSACTIONS;
47-
bool fWalletRbf = DEFAULT_WALLET_RBF;
4847

4948
const char * DEFAULT_WALLET_DAT = "wallet.dat";
5049
const uint32_t BIP32_HARDENED_KEY_LIMIT = 0x80000000;
@@ -2997,15 +2996,8 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
29972996
//
29982997
// Note how the sequence number is set to non-maxint so that
29992998
// the nLockTime set above actually works.
3000-
//
3001-
// BIP125 defines opt-in RBF as any nSequence < maxint-1, so
3002-
// we use the highest possible value in that range (maxint-2)
3003-
// to avoid conflicting with other possible uses of nSequence,
3004-
// and in the spirit of "smallest possible change from prior
3005-
// behavior."
30062999
for (const auto& coin : setCoins) {
3007-
txNew.vin.push_back(CTxIn(coin.first->GetHash(),coin.second,CScript(),
3008-
std::numeric_limits<unsigned int>::max() - (fWalletRbf ? 2 : 1)));
3000+
txNew.vin.push_back(CTxIn(coin.first->GetHash(),coin.second,CScript(), std::numeric_limits<unsigned int>::max() - 1));
30093001
if (reissuanceToken &&
30103002
coin.first->GetOutputAsset(coin.second) == *reissuanceToken) {
30113003
reissuanceIndex = txNew.vin.size()-1;
@@ -4155,7 +4147,6 @@ std::string CWallet::GetWalletHelpString(bool showDebug)
41554147
strUsage += HelpMessageOpt("-spendzeroconfchange", strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), DEFAULT_SPEND_ZEROCONF_CHANGE));
41564148
strUsage += HelpMessageOpt("-txconfirmtarget=<n>", strprintf(_("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)"), DEFAULT_TX_CONFIRM_TARGET));
41574149
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));
4158-
strUsage += HelpMessageOpt("-walletrbf", strprintf(_("Send transactions with full-RBF opt-in enabled (default: %u)"), DEFAULT_WALLET_RBF));
41594150
strUsage += HelpMessageOpt("-upgradewallet", _("Upgrade wallet to latest format on startup"));
41604151
strUsage += HelpMessageOpt("-wallet=<file>", _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), DEFAULT_WALLET_DAT));
41614152
strUsage += HelpMessageOpt("-walletbroadcast", _("Make the wallet broadcast transactions") + " " + strprintf(_("(default: %u)"), DEFAULT_WALLETBROADCAST));
@@ -4471,7 +4462,6 @@ bool CWallet::ParameterInteraction()
44714462
nTxConfirmTarget = GetArg("-txconfirmtarget", DEFAULT_TX_CONFIRM_TARGET);
44724463
bSpendZeroConfChange = GetBoolArg("-spendzeroconfchange", DEFAULT_SPEND_ZEROCONF_CHANGE);
44734464
fSendFreeTransactions = GetBoolArg("-sendfreetransactions", DEFAULT_SEND_FREE_TRANSACTIONS);
4474-
fWalletRbf = GetBoolArg("-walletrbf", DEFAULT_WALLET_RBF);
44754465

44764466
if (fSendFreeTransactions && GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) <= 0)
44774467
return InitError("Creation of free transactions with their relay disabled is not supported.");

src/wallet/wallet.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ extern CFeeRate payTxFee;
4141
extern unsigned int nTxConfirmTarget;
4242
extern bool bSpendZeroConfChange;
4343
extern bool fSendFreeTransactions;
44-
extern bool fWalletRbf;
4544

4645
static const unsigned int DEFAULT_KEYPOOL_SIZE = 100;
4746
//! -paytxfee default
@@ -64,8 +63,6 @@ static const bool DEFAULT_SEND_FREE_TRANSACTIONS = false;
6463
static const bool DEFAULT_WALLET_REJECT_LONG_CHAINS = false;
6564
//! -txconfirmtarget default
6665
static const unsigned int DEFAULT_TX_CONFIRM_TARGET = 6;
67-
//! -walletrbf default
68-
static const bool DEFAULT_WALLET_RBF = true;
6966
//! Largest (in bytes) free transaction we're willing to create
7067
static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000;
7168
static const bool DEFAULT_WALLETBROADCAST = true;

0 commit comments

Comments
 (0)