diff options
author | Andrew Chow <achow101-github@achow101.com> | 2022-03-16 15:13:57 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2022-03-17 10:57:08 -0400 |
commit | 46022953ee2e8113167bafd1fd48a383a578b13c (patch) | |
tree | b4af9d6e508073b4d051d9b158d4ab798f713d95 | |
parent | 10379f007fd2c18f4cd24d0a0783d6d929f45556 (diff) |
wallet: Remove use_max_sig default value
As we change the constructor for COutput, it becomes somewhat dangerous
if there are default values.
-rw-r--r-- | src/bench/coin_selection.cpp | 2 | ||||
-rw-r--r-- | src/wallet/spend.cpp | 2 | ||||
-rw-r--r-- | src/wallet/spend.h | 2 | ||||
-rw-r--r-- | src/wallet/test/coinselector_tests.cpp | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/bench/coin_selection.cpp b/src/bench/coin_selection.cpp index c97ead84f6..c9c9fa3c9c 100644 --- a/src/bench/coin_selection.cpp +++ b/src/bench/coin_selection.cpp @@ -58,7 +58,7 @@ static void CoinSelection(benchmark::Bench& bench) // Create coins std::vector<COutput> coins; for (const auto& wtx : wtxs) { - coins.emplace_back(wallet, *wtx, 0 /* iIn */, 6 * 24 /* depth */, true /* spendable */, true /* solvable */, true /* safe */); + coins.emplace_back(wallet, *wtx, /*iIn=*/ 0, /*depth=*/ 6 * 24, /*spendable=*/ true, /*solvable=*/ true, /*safe=*/ true, /*use_max_sig_in=*/ false); } const CoinEligibilityFilter filter_standard(1, 6, 0); diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index e54661456b..6f5d0fed86 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -275,7 +275,7 @@ std::map<CTxDestination, std::vector<COutput>> ListCoins(const CWallet& wallet) CTxDestination address; if (ExtractDestination(FindNonChangeParentOutput(wallet, *it->second.tx, output.n).scriptPubKey, address)) { result[address].emplace_back( - wallet, it->second, output.n, depth, true /* spendable */, true /* solvable */, false /* safe */); + wallet, it->second, output.n, depth, /*spendable=*/ true, /*solvable=*/ true, /*safe=*/ false, /*use_max_sig_in=*/ false); } } } diff --git a/src/wallet/spend.h b/src/wallet/spend.h index 62b28c33c8..eb0a2ec05d 100644 --- a/src/wallet/spend.h +++ b/src/wallet/spend.h @@ -48,7 +48,7 @@ public: */ bool safe; - COutput(const CWallet& wallet, const CWalletTx& wtx, int iIn, int depth, bool spendable, bool solvable, bool safe, bool use_max_sig_in = false) + COutput(const CWallet& wallet, const CWalletTx& wtx, int iIn, int depth, bool spendable, bool solvable, bool safe, bool use_max_sig_in) : tx(&wtx), i(iIn), depth(depth), diff --git a/src/wallet/test/coinselector_tests.cpp b/src/wallet/test/coinselector_tests.cpp index 1a6430203f..430e202d4f 100644 --- a/src/wallet/test/coinselector_tests.cpp +++ b/src/wallet/test/coinselector_tests.cpp @@ -98,7 +98,7 @@ static void add_coin(std::vector<COutput>& coins, CWallet& wallet, const CAmount wtx.m_amounts[CWalletTx::DEBIT].Set(ISMINE_SPENDABLE, 1); wtx.m_is_cache_empty = false; } - COutput output(wallet, wtx, nInput, nAge, true /* spendable */, true /* solvable */, true /* safe */); + COutput output(wallet, wtx, nInput, nAge, /*spendable=*/ true, /*solvable=*/ true, /*safe=*/ true, /*use_max_sig_in=*/ false); coins.push_back(output); } |