diff options
author | Lőrinc <pap.lorinc@gmail.com> | 2024-05-13 22:03:27 +0200 |
---|---|---|
committer | Lőrinc <pap.lorinc@gmail.com> | 2024-06-27 20:56:13 +0200 |
commit | c76aaaf90034a15917d02a71e3fdc36e8dd927f6 (patch) | |
tree | bd01eb0633c70dc656401ccb16da4b0fbf0e6b19 /src | |
parent | f0745d028e42486fb346015cfc481923739c479e (diff) |
Reserve space for transaction outputs in CreateTransactionInternal
Accommodating possible later insert as well
Co-authored-by: Cory Fields <cory-nospam-@coryfields.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/spend.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index 0a59353052..e1a4e8afc4 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -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)); |