Skip to content

Commit d338712

Browse files
committed
scripted-diff: rename fAllowOtherInputs -> m_allow_other_inputs
-BEGIN VERIFY SCRIPT- sed -i 's/fAllowOtherInputs/m_allow_other_inputs/g' -- $(git grep --files-with-matches 'fAllowOtherInputs') -END VERIFY SCRIPT-
1 parent 8dea74a commit d338712

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/wallet/coincontrol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class CCoinControl
3737
bool m_include_unsafe_inputs = false;
3838
//! If true, the selection process can add extra unselected inputs from the wallet
3939
//! while requires all selected inputs be used
40-
bool fAllowOtherInputs = false;
40+
bool m_allow_other_inputs = false;
4141
//! Includes watch only addresses which are solvable
4242
bool fAllowWatchOnly = false;
4343
//! Override automatic min/max checks on fee, m_feerate must be set if true

src/wallet/feebumper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Result CreateRateBumpTransaction(CWallet& wallet, const uint256& txid, const CCo
213213
for (const auto& inputs : wtx.tx->vin) {
214214
new_coin_control.Select(COutPoint(inputs.prevout));
215215
}
216-
new_coin_control.fAllowOtherInputs = true;
216+
new_coin_control.m_allow_other_inputs = true;
217217

218218
// We cannot source new unconfirmed inputs(bip125 rule 2)
219219
new_coin_control.m_min_depth = 1;

src/wallet/rpc/spend.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ void FundTransaction(CWallet& wallet, CMutableTransaction& tx, CAmount& fee_out,
536536
true, true);
537537

538538
if (options.exists("add_inputs")) {
539-
coinControl.fAllowOtherInputs = options["add_inputs"].get_bool();
539+
coinControl.m_allow_other_inputs = options["add_inputs"].get_bool();
540540
}
541541

542542
if (options.exists("changeAddress") || options.exists("change_address")) {
@@ -823,7 +823,7 @@ RPCHelpMan fundrawtransaction()
823823
int change_position;
824824
CCoinControl coin_control;
825825
// Automatically select (additional) coins. Can be overridden by options.add_inputs.
826-
coin_control.fAllowOtherInputs = true;
826+
coin_control.m_allow_other_inputs = true;
827827
FundTransaction(*pwallet, tx, fee, change_position, request.params[1], coin_control, /*override_min_fee=*/true);
828828

829829
UniValue result(UniValue::VOBJ);
@@ -1225,7 +1225,7 @@ RPCHelpMan send()
12251225
CCoinControl coin_control;
12261226
// Automatically select coins, unless at least one is manually selected. Can
12271227
// be overridden by options.add_inputs.
1228-
coin_control.fAllowOtherInputs = rawTx.vin.size() == 0;
1228+
coin_control.m_allow_other_inputs = rawTx.vin.size() == 0;
12291229
SetOptionsInputWeights(options["inputs"], options);
12301230
FundTransaction(*pwallet, rawTx, fee, change_position, options, coin_control, /*override_min_fee=*/false);
12311231

@@ -1649,7 +1649,7 @@ RPCHelpMan walletcreatefundedpsbt()
16491649
CCoinControl coin_control;
16501650
// Automatically select coins, unless at least one is manually selected. Can
16511651
// be overridden by options.add_inputs.
1652-
coin_control.fAllowOtherInputs = rawTx.vin.size() == 0;
1652+
coin_control.m_allow_other_inputs = rawTx.vin.size() == 0;
16531653
SetOptionsInputWeights(request.params[0], options);
16541654
FundTransaction(wallet, rawTx, fee, change_position, options, coin_control, /*override_min_fee=*/true);
16551655

src/wallet/spend.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ CoinsResult AvailableCoins(const CWallet& wallet,
171171
if (output.nValue < nMinimumAmount || output.nValue > nMaximumAmount)
172172
continue;
173173

174-
if (coinControl && coinControl->HasSelected() && !coinControl->fAllowOtherInputs && !coinControl->IsSelected(outpoint))
174+
if (coinControl && coinControl->HasSelected() && !coinControl->m_allow_other_inputs && !coinControl->IsSelected(outpoint))
175175
continue;
176176

177177
if (wallet.IsLockedCoin(outpoint))
@@ -480,7 +480,7 @@ std::optional<SelectionResult> SelectCoins(const CWallet& wallet, const std::vec
480480
}
481481

482482
// coin control -> return all selected outputs (we want all selected to go into the transaction for sure)
483-
if (coin_control.HasSelected() && !coin_control.fAllowOtherInputs) {
483+
if (coin_control.HasSelected() && !coin_control.m_allow_other_inputs) {
484484
SelectionResult result(nTargetValue, SelectionAlgorithm::MANUAL);
485485
result.AddInput(preset_inputs);
486486
if (result.GetSelectedValue() < nTargetValue) return std::nullopt;

src/wallet/test/coinselector_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ BOOST_AUTO_TEST_CASE(bnb_search_test)
336336
add_coin(coins, *wallet, 3 * CENT, coin_selection_params_bnb.m_effective_feerate, 6 * 24, false, 0, true);
337337
add_coin(coins, *wallet, 2 * CENT, coin_selection_params_bnb.m_effective_feerate, 6 * 24, false, 0, true);
338338
CCoinControl coin_control;
339-
coin_control.fAllowOtherInputs = true;
339+
coin_control.m_allow_other_inputs = true;
340340
coin_control.Select(coins.at(0).outpoint);
341341
coin_selection_params_bnb.m_effective_feerate = CFeeRate(0);
342342
const auto result10 = SelectCoins(*wallet, coins, 10 * CENT, coin_control, coin_selection_params_bnb);
@@ -392,7 +392,7 @@ BOOST_AUTO_TEST_CASE(bnb_search_test)
392392
expected_result.Clear();
393393
add_coin(9 * CENT, 2, expected_result);
394394
add_coin(1 * CENT, 2, expected_result);
395-
coin_control.fAllowOtherInputs = true;
395+
coin_control.m_allow_other_inputs = true;
396396
coin_control.Select(coins.at(1).outpoint); // pre select 9 coin
397397
const auto result13 = SelectCoins(*wallet, coins, 10 * CENT, coin_control, coin_selection_params_bnb);
398398
BOOST_CHECK(EquivalentResult(expected_result, *result13));

0 commit comments

Comments
 (0)