diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-07-31 17:22:04 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2023-03-03 18:18:03 -0300 |
commit | 06ec8f992890cac69cd0fd20224aa51fa311a181 (patch) | |
tree | b4d34d716b93574150ac7bfcff1051718f5b87cc /src/wallet/coinselection.cpp | |
parent | 3b88c8502534f0dc94e0abcb04ffa80ba8bd7f01 (diff) | |
download | bitcoin-06ec8f992890cac69cd0fd20224aa51fa311a181.tar.xz |
wallet: make OutputGroup "positive_only" filter explicit
And not hide it inside the `OutputGroup::Insert` method.
This method does not return anything if insertion fails.
We can know before calling `Insert` whether the coin
will be accepted or not.
Diffstat (limited to 'src/wallet/coinselection.cpp')
-rw-r--r-- | src/wallet/coinselection.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/wallet/coinselection.cpp b/src/wallet/coinselection.cpp index e6ba89627c..cebe2cd7ed 100644 --- a/src/wallet/coinselection.cpp +++ b/src/wallet/coinselection.cpp @@ -333,10 +333,7 @@ std::optional<SelectionResult> KnapsackSolver(std::vector<OutputGroup>& groups, ******************************************************************************/ -void OutputGroup::Insert(const COutput& output, size_t ancestors, size_t descendants, bool positive_only) { - // Filter for positive only here before adding the coin - if (positive_only && output.GetEffectiveValue() <= 0) return; - +void OutputGroup::Insert(const COutput& output, size_t ancestors, size_t descendants) { m_outputs.push_back(output); COutput& coin = m_outputs.back(); |