Skip to content

Commit a059633

Browse files
committed
wallet: Improve CTxIn creation in CreateTransaction
1 parent 31c137a commit a059633

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3892,9 +3892,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CWalletT
38923892
// nLockTime set above actually works.
38933893
txNew.vin.clear();
38943894
for (const auto& coin : vecCoins) {
3895-
CTxIn txin = CTxIn(coin.outpoint,CScript(),
3896-
CTxIn::SEQUENCE_FINAL - 1);
3897-
txNew.vin.push_back(txin);
3895+
txNew.vin.emplace_back(coin.outpoint, CScript(), CTxIn::SEQUENCE_FINAL - 1);
38983896
}
38993897

39003898
auto calculateFee = [&](CAmount& nFee) -> bool {

0 commit comments

Comments
 (0)