diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-08-01 16:15:36 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2023-03-06 09:45:40 -0300 |
commit | 461f0821a2dff0a27f755464b0eb92314fba1acd (patch) | |
tree | d04797fd9b8cd29d0a0690af982d7f29547e0326 /src/bench/coin_selection.cpp | |
parent | d8e749bb840cf65065ed00561998255156126278 (diff) |
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/bench/coin_selection.cpp')
-rw-r--r-- | src/bench/coin_selection.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bench/coin_selection.cpp b/src/bench/coin_selection.cpp index f77ac24df2..8a78783517 100644 --- a/src/bench/coin_selection.cpp +++ b/src/bench/coin_selection.cpp @@ -91,7 +91,7 @@ static void add_coin(const CAmount& nValue, int nInput, std::vector<OutputGroup> tx.vout[nInput].nValue = nValue; COutput output(COutPoint(tx.GetHash(), nInput), tx.vout.at(nInput), /*depth=*/ 0, /*input_bytes=*/ -1, /*spendable=*/ true, /*solvable=*/ true, /*safe=*/ true, /*time=*/ 0, /*from_me=*/ true, /*fees=*/ 0); set.emplace_back(); - set.back().Insert(output, /*ancestors=*/ 0, /*descendants=*/ 0); + set.back().Insert(std::make_shared<COutput>(output), /*ancestors=*/ 0, /*descendants=*/ 0); } // Copied from src/wallet/test/coinselector_tests.cpp static CAmount make_hard_case(int utxos, std::vector<OutputGroup>& utxo_pool) |