aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/spend.h
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2022-08-01 16:15:36 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2023-03-06 09:45:40 -0300
commit461f0821a2dff0a27f755464b0eb92314fba1acd (patch)
treed04797fd9b8cd29d0a0690af982d7f29547e0326 /src/wallet/spend.h
parentd8e749bb840cf65065ed00561998255156126278 (diff)
downloadbitcoin-461f0821a2dff0a27f755464b0eb92314fba1acd.tar.xz
refactor: make OutputGroup::m_outputs field a vector of shared_ptr
Initial steps towards sharing COutput instances across all possible OutputGroups (instead of copying them time after time).
Diffstat (limited to 'src/wallet/spend.h')
-rw-r--r--src/wallet/spend.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/spend.h b/src/wallet/spend.h
index ad122b7ef3..105a1a2549 100644
--- a/src/wallet/spend.h
+++ b/src/wallet/spend.h
@@ -148,7 +148,7 @@ util::Result<SelectionResult> ChooseSelectionResult(const CWallet& wallet, const
// User manually selected inputs that must be part of the transaction
struct PreSelectedInputs
{
- std::set<COutput> coins;
+ std::set<std::shared_ptr<COutput>> coins;
// If subtract fee from outputs is disabled, the 'total_amount'
// will be the sum of each output effective value
// instead of the sum of the outputs amount
@@ -161,7 +161,7 @@ struct PreSelectedInputs
} else {
total_amount += output.GetEffectiveValue();
}
- coins.insert(output);
+ coins.insert(std::make_shared<COutput>(output));
}
};