aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/test/coinselector_tests.cpp
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2022-07-31 17:22:04 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2023-03-03 18:18:03 -0300
commit06ec8f992890cac69cd0fd20224aa51fa311a181 (patch)
treeb4d34d716b93574150ac7bfcff1051718f5b87cc /src/wallet/test/coinselector_tests.cpp
parent3b88c8502534f0dc94e0abcb04ffa80ba8bd7f01 (diff)
downloadbitcoin-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/test/coinselector_tests.cpp')
-rw-r--r--src/wallet/test/coinselector_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/test/coinselector_tests.cpp b/src/wallet/test/coinselector_tests.cpp
index 1c731b95e5..1c2a561bef 100644
--- a/src/wallet/test/coinselector_tests.cpp
+++ b/src/wallet/test/coinselector_tests.cpp
@@ -53,7 +53,7 @@ static void add_coin(const CAmount& nValue, int nInput, SelectionResult& result)
tx.nLockTime = nextLockTime++; // so all transactions get different hashes
COutput output(COutPoint(tx.GetHash(), nInput), tx.vout.at(nInput), /*depth=*/ 1, /*input_bytes=*/ -1, /*spendable=*/ true, /*solvable=*/ true, /*safe=*/ true, /*time=*/ 0, /*from_me=*/ false, /*fees=*/ 0);
OutputGroup group;
- group.Insert(output, /*ancestors=*/ 0, /*descendants=*/ 0, /*positive_only=*/ true);
+ group.Insert(output, /*ancestors=*/ 0, /*descendants=*/ 0);
result.AddInput(group);
}
@@ -134,7 +134,7 @@ inline std::vector<OutputGroup>& GroupCoins(const std::vector<COutput>& availabl
static_groups.clear();
for (auto& coin : available_coins) {
static_groups.emplace_back();
- static_groups.back().Insert(coin, /*ancestors=*/ 0, /*descendants=*/ 0, /*positive_only=*/ false);
+ static_groups.back().Insert(coin, /*ancestors=*/ 0, /*descendants=*/ 0);
}
return static_groups;
}