@@ -40,6 +40,7 @@ CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
40
40
unsigned int nTxConfirmTarget = DEFAULT_TX_CONFIRM_TARGET;
41
41
bool bSpendZeroConfChange = DEFAULT_SPEND_ZEROCONF_CHANGE;
42
42
bool fSendFreeTransactions = DEFAULT_SEND_FREE_TRANSACTIONS;
43
+ bool fOptIntoFullRbf = DEFAULT_OPT_INTO_FULL_RBF;
43
44
44
45
const char * DEFAULT_WALLET_DAT = " wallet.dat" ;
45
46
const uint32_t BIP32_HARDENED_KEY_LIMIT = 0x80000000 ;
@@ -2355,11 +2356,11 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
2355
2356
2356
2357
// Fill vin
2357
2358
//
2358
- // Note how the sequence number is set to max()-1 so that the
2359
- // nLockTime set above actually works.
2359
+ // Note how the sequence number is set to non-maxint so that
2360
+ // the nLockTime set above actually works.
2360
2361
BOOST_FOREACH (const PAIRTYPE (const CWalletTx*,unsigned int )& coin, setCoins)
2361
2362
txNew.vin .push_back (CTxIn (coin.first ->GetHash (),coin.second ,CScript (),
2362
- std::numeric_limits<unsigned int >::max ()- 1 ));
2363
+ std::numeric_limits<unsigned int >::max () - ( fOptIntoFullRbf ? 2 : 1 ) ));
2363
2364
2364
2365
// Sign
2365
2366
int nIn = 0 ;
@@ -3240,6 +3241,7 @@ std::string CWallet::GetWalletHelpString(bool showDebug)
3240
3241
strUsage += HelpMessageOpt (" -spendzeroconfchange" , strprintf (_ (" Spend unconfirmed change when sending transactions (default: %u)" ), DEFAULT_SPEND_ZEROCONF_CHANGE));
3241
3242
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));
3242
3243
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));
3244
+ strUsage += HelpMessageOpt (" -optintofullrbf" , strprintf (_ (" Send transactions with full-RBF opt-in enabled (default: %u)" ), DEFAULT_OPT_INTO_FULL_RBF));
3243
3245
strUsage += HelpMessageOpt (" -upgradewallet" , _ (" Upgrade wallet to latest format on startup" ));
3244
3246
strUsage += HelpMessageOpt (" -wallet=<file>" , _ (" Specify wallet file (within data directory)" ) + " " + strprintf (_ (" (default: %s)" ), DEFAULT_WALLET_DAT));
3245
3247
strUsage += HelpMessageOpt (" -walletbroadcast" , _ (" Make the wallet broadcast transactions" ) + " " + strprintf (_ (" (default: %u)" ), DEFAULT_WALLETBROADCAST));
@@ -3480,6 +3482,7 @@ bool CWallet::ParameterInteraction()
3480
3482
nTxConfirmTarget = GetArg (" -txconfirmtarget" , DEFAULT_TX_CONFIRM_TARGET);
3481
3483
bSpendZeroConfChange = GetBoolArg (" -spendzeroconfchange" , DEFAULT_SPEND_ZEROCONF_CHANGE);
3482
3484
fSendFreeTransactions = GetBoolArg (" -sendfreetransactions" , DEFAULT_SEND_FREE_TRANSACTIONS);
3485
+ fOptIntoFullRbf = GetBoolArg (" -optintofullrbf" , DEFAULT_OPT_INTO_FULL_RBF);
3483
3486
3484
3487
return true ;
3485
3488
}
0 commit comments