mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-09 21:57:20 +01:00
Reserve space for transaction outputs in CreateTransactionInternal
Accommodating possible later insert as well Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
This commit is contained in:
parent
f0745d028e
commit
c76aaaf900
1 changed files with 1 additions and 0 deletions
|
@ -1154,6 +1154,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
|
|||
result.GetSelectedValue());
|
||||
|
||||
// vouts to the payees
|
||||
txNew.vout.reserve(vecSend.size() + 1); // + 1 because of possible later insert
|
||||
for (const auto& recipient : vecSend)
|
||||
{
|
||||
txNew.vout.emplace_back(recipient.nAmount, GetScriptForDestination(recipient.dest));
|
||||
|
|
Loading…
Add table
Reference in a new issue