Skip to content

Commit 4602295

Browse files
committed
wallet: Remove use_max_sig default value
As we change the constructor for COutput, it becomes somewhat dangerous if there are default values.
1 parent 10379f0 commit 4602295

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/bench/coin_selection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static void CoinSelection(benchmark::Bench& bench)
5858
// Create coins
5959
std::vector<COutput> coins;
6060
for (const auto& wtx : wtxs) {
61-
coins.emplace_back(wallet, *wtx, 0 /* iIn */, 6 * 24 /* depth */, true /* spendable */, true /* solvable */, true /* safe */);
61+
coins.emplace_back(wallet, *wtx, /*iIn=*/ 0, /*depth=*/ 6 * 24, /*spendable=*/ true, /*solvable=*/ true, /*safe=*/ true, /*use_max_sig_in=*/ false);
6262
}
6363

6464
const CoinEligibilityFilter filter_standard(1, 6, 0);

src/wallet/spend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ std::map<CTxDestination, std::vector<COutput>> ListCoins(const CWallet& wallet)
275275
CTxDestination address;
276276
if (ExtractDestination(FindNonChangeParentOutput(wallet, *it->second.tx, output.n).scriptPubKey, address)) {
277277
result[address].emplace_back(
278-
wallet, it->second, output.n, depth, true /* spendable */, true /* solvable */, false /* safe */);
278+
wallet, it->second, output.n, depth, /*spendable=*/ true, /*solvable=*/ true, /*safe=*/ false, /*use_max_sig_in=*/ false);
279279
}
280280
}
281281
}

src/wallet/spend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class COutput
4848
*/
4949
bool safe;
5050

51-
COutput(const CWallet& wallet, const CWalletTx& wtx, int iIn, int depth, bool spendable, bool solvable, bool safe, bool use_max_sig_in = false)
51+
COutput(const CWallet& wallet, const CWalletTx& wtx, int iIn, int depth, bool spendable, bool solvable, bool safe, bool use_max_sig_in)
5252
: tx(&wtx),
5353
i(iIn),
5454
depth(depth),

src/wallet/test/coinselector_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static void add_coin(std::vector<COutput>& coins, CWallet& wallet, const CAmount
9898
wtx.m_amounts[CWalletTx::DEBIT].Set(ISMINE_SPENDABLE, 1);
9999
wtx.m_is_cache_empty = false;
100100
}
101-
COutput output(wallet, wtx, nInput, nAge, true /* spendable */, true /* solvable */, true /* safe */);
101+
COutput output(wallet, wtx, nInput, nAge, /*spendable=*/ true, /*solvable=*/ true, /*safe=*/ true, /*use_max_sig_in=*/ false);
102102
coins.push_back(output);
103103
}
104104

0 commit comments

Comments
 (0)