mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
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-
This commit is contained in:
parent
8dea74a8ff
commit
d338712886
5 changed files with 10 additions and 10 deletions
|
@ -37,7 +37,7 @@ public:
|
|||
bool m_include_unsafe_inputs = false;
|
||||
//! If true, the selection process can add extra unselected inputs from the wallet
|
||||
//! while requires all selected inputs be used
|
||||
bool fAllowOtherInputs = false;
|
||||
bool m_allow_other_inputs = false;
|
||||
//! Includes watch only addresses which are solvable
|
||||
bool fAllowWatchOnly = false;
|
||||
//! Override automatic min/max checks on fee, m_feerate must be set if true
|
||||
|
|
|
@ -213,7 +213,7 @@ Result CreateRateBumpTransaction(CWallet& wallet, const uint256& txid, const CCo
|
|||
for (const auto& inputs : wtx.tx->vin) {
|
||||
new_coin_control.Select(COutPoint(inputs.prevout));
|
||||
}
|
||||
new_coin_control.fAllowOtherInputs = true;
|
||||
new_coin_control.m_allow_other_inputs = true;
|
||||
|
||||
// We cannot source new unconfirmed inputs(bip125 rule 2)
|
||||
new_coin_control.m_min_depth = 1;
|
||||
|
|
|
@ -536,7 +536,7 @@ void FundTransaction(CWallet& wallet, CMutableTransaction& tx, CAmount& fee_out,
|
|||
true, true);
|
||||
|
||||
if (options.exists("add_inputs")) {
|
||||
coinControl.fAllowOtherInputs = options["add_inputs"].get_bool();
|
||||
coinControl.m_allow_other_inputs = options["add_inputs"].get_bool();
|
||||
}
|
||||
|
||||
if (options.exists("changeAddress") || options.exists("change_address")) {
|
||||
|
@ -823,7 +823,7 @@ RPCHelpMan fundrawtransaction()
|
|||
int change_position;
|
||||
CCoinControl coin_control;
|
||||
// Automatically select (additional) coins. Can be overridden by options.add_inputs.
|
||||
coin_control.fAllowOtherInputs = true;
|
||||
coin_control.m_allow_other_inputs = true;
|
||||
FundTransaction(*pwallet, tx, fee, change_position, request.params[1], coin_control, /*override_min_fee=*/true);
|
||||
|
||||
UniValue result(UniValue::VOBJ);
|
||||
|
@ -1225,7 +1225,7 @@ RPCHelpMan send()
|
|||
CCoinControl coin_control;
|
||||
// Automatically select coins, unless at least one is manually selected. Can
|
||||
// be overridden by options.add_inputs.
|
||||
coin_control.fAllowOtherInputs = rawTx.vin.size() == 0;
|
||||
coin_control.m_allow_other_inputs = rawTx.vin.size() == 0;
|
||||
SetOptionsInputWeights(options["inputs"], options);
|
||||
FundTransaction(*pwallet, rawTx, fee, change_position, options, coin_control, /*override_min_fee=*/false);
|
||||
|
||||
|
@ -1649,7 +1649,7 @@ RPCHelpMan walletcreatefundedpsbt()
|
|||
CCoinControl coin_control;
|
||||
// Automatically select coins, unless at least one is manually selected. Can
|
||||
// be overridden by options.add_inputs.
|
||||
coin_control.fAllowOtherInputs = rawTx.vin.size() == 0;
|
||||
coin_control.m_allow_other_inputs = rawTx.vin.size() == 0;
|
||||
SetOptionsInputWeights(request.params[0], options);
|
||||
FundTransaction(wallet, rawTx, fee, change_position, options, coin_control, /*override_min_fee=*/true);
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ CoinsResult AvailableCoins(const CWallet& wallet,
|
|||
if (output.nValue < nMinimumAmount || output.nValue > nMaximumAmount)
|
||||
continue;
|
||||
|
||||
if (coinControl && coinControl->HasSelected() && !coinControl->fAllowOtherInputs && !coinControl->IsSelected(outpoint))
|
||||
if (coinControl && coinControl->HasSelected() && !coinControl->m_allow_other_inputs && !coinControl->IsSelected(outpoint))
|
||||
continue;
|
||||
|
||||
if (wallet.IsLockedCoin(outpoint))
|
||||
|
@ -480,7 +480,7 @@ std::optional<SelectionResult> SelectCoins(const CWallet& wallet, const std::vec
|
|||
}
|
||||
|
||||
// coin control -> return all selected outputs (we want all selected to go into the transaction for sure)
|
||||
if (coin_control.HasSelected() && !coin_control.fAllowOtherInputs) {
|
||||
if (coin_control.HasSelected() && !coin_control.m_allow_other_inputs) {
|
||||
SelectionResult result(nTargetValue, SelectionAlgorithm::MANUAL);
|
||||
result.AddInput(preset_inputs);
|
||||
if (result.GetSelectedValue() < nTargetValue) return std::nullopt;
|
||||
|
|
|
@ -336,7 +336,7 @@ BOOST_AUTO_TEST_CASE(bnb_search_test)
|
|||
add_coin(coins, *wallet, 3 * CENT, coin_selection_params_bnb.m_effective_feerate, 6 * 24, false, 0, true);
|
||||
add_coin(coins, *wallet, 2 * CENT, coin_selection_params_bnb.m_effective_feerate, 6 * 24, false, 0, true);
|
||||
CCoinControl coin_control;
|
||||
coin_control.fAllowOtherInputs = true;
|
||||
coin_control.m_allow_other_inputs = true;
|
||||
coin_control.Select(coins.at(0).outpoint);
|
||||
coin_selection_params_bnb.m_effective_feerate = CFeeRate(0);
|
||||
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)
|
|||
expected_result.Clear();
|
||||
add_coin(9 * CENT, 2, expected_result);
|
||||
add_coin(1 * CENT, 2, expected_result);
|
||||
coin_control.fAllowOtherInputs = true;
|
||||
coin_control.m_allow_other_inputs = true;
|
||||
coin_control.Select(coins.at(1).outpoint); // pre select 9 coin
|
||||
const auto result13 = SelectCoins(*wallet, coins, 10 * CENT, coin_control, coin_selection_params_bnb);
|
||||
BOOST_CHECK(EquivalentResult(expected_result, *result13));
|
||||
|
|
Loading…
Add table
Reference in a new issue