mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Allow to opt-into RBF when creating a transaction
This commit is contained in:
committed by
Russell Yanofsky
parent
82274c02ed
commit
568c05a591
@@ -2566,9 +2566,10 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
|
||||
// to avoid conflicting with other possible uses of nSequence,
|
||||
// and in the spirit of "smallest posible change from prior
|
||||
// behavior."
|
||||
bool rbf = coinControl ? coinControl->signalRbf : fWalletRbf;
|
||||
for (const auto& coin : setCoins)
|
||||
txNew.vin.push_back(CTxIn(coin.first->GetHash(),coin.second,CScript(),
|
||||
std::numeric_limits<unsigned int>::max() - (fWalletRbf ? 2 : 1)));
|
||||
std::numeric_limits<unsigned int>::max() - (rbf ? 2 : 1)));
|
||||
|
||||
// Fill in dummy signatures for fee calculation.
|
||||
int nIn = 0;
|
||||
|
||||
Reference in New Issue
Block a user