Skip to content

Commit aeaabd6

Browse files
committed
Allow to opt-into RBF when creating a transaction
1 parent cde33d3 commit aeaabd6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
20672067
// nLockTime set above actually works.
20682068
BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins)
20692069
txNew.vin.push_back(CTxIn(coin.first->GetHash(),coin.second,CScript(),
2070-
std::numeric_limits<unsigned int>::max()-1));
2070+
std::numeric_limits<unsigned int>::max() - ((flags & CREATE_TX_RBF_OPT_IN) ? 2 : 1) ));
20712071

20722072
// Sign
20732073
int nIn = 0;

src/wallet/wallet.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,8 @@ class CWalletKey
448448

449449
enum CreateTransactionFlags {
450450
CREATE_TX_DEFAULT = 0,
451-
CREATE_TX_DONT_SIGN = (1U << 0)
451+
CREATE_TX_DONT_SIGN = (1U << 0),
452+
CREATE_TX_RBF_OPT_IN = (1U << 1)
452453
};
453454

454455
/**

0 commit comments

Comments
 (0)