Skip to content

Commit ec585f1

Browse files
l0rinctheuni
andcommitted
Reserve space for transaction inputs in CreateTransactionInternal
Co-authored-by: Cory Fields <[email protected]>
1 parent c76aaaf commit ec585f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/wallet/spend.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,6 +1205,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
12051205
// behavior."
12061206
bool use_anti_fee_sniping = true;
12071207
const uint32_t default_sequence{coin_control.m_signal_bip125_rbf.value_or(wallet.m_signal_rbf) ? MAX_BIP125_RBF_SEQUENCE : CTxIn::MAX_SEQUENCE_NONFINAL};
1208+
txNew.vin.reserve(selected_coins.size());
12081209
for (const auto& coin : selected_coins) {
12091210
std::optional<uint32_t> sequence = coin_control.GetSequence(coin->outpoint);
12101211
if (sequence) {

0 commit comments

Comments
 (0)