mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
refactor: fix clang-tidy named args usage
This commit is contained in:
@@ -109,7 +109,7 @@ static UniValue FinishTransaction(const std::shared_ptr<CWallet> pwallet, const
|
||||
CTransactionRef tx(MakeTransactionRef(std::move(mtx)));
|
||||
result.pushKV("txid", tx->GetHash().GetHex());
|
||||
if (add_to_wallet && !psbt_opt_in) {
|
||||
pwallet->CommitTransaction(tx, {}, /*orderForm*/ {});
|
||||
pwallet->CommitTransaction(tx, {}, /*orderForm=*/{});
|
||||
} else {
|
||||
result.pushKV("hex", hex);
|
||||
}
|
||||
@@ -198,7 +198,7 @@ static void SetFeeEstimateMode(const CWallet& wallet, CCoinControl& cc, const Un
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot specify both estimate_mode and fee_rate");
|
||||
}
|
||||
// Fee rates in sat/vB cannot represent more than 3 significant digits.
|
||||
cc.m_feerate = CFeeRate{AmountFromValue(fee_rate, /* decimals */ 3)};
|
||||
cc.m_feerate = CFeeRate{AmountFromValue(fee_rate, /*decimals=*/3)};
|
||||
if (override_min_fee) cc.fOverrideFeeRate = true;
|
||||
// Default RBF to true for explicit fee_rate, if unset.
|
||||
if (!cc.m_signal_bip125_rbf) cc.m_signal_bip125_rbf = true;
|
||||
@@ -293,7 +293,7 @@ RPCHelpMan sendtoaddress()
|
||||
// We also enable partial spend avoidance if reuse avoidance is set.
|
||||
coin_control.m_avoid_partial_spends |= coin_control.m_avoid_address_reuse;
|
||||
|
||||
SetFeeEstimateMode(*pwallet, coin_control, /* conf_target */ request.params[6], /* estimate_mode */ request.params[7], /* fee_rate */ request.params[9], /* override_min_fee */ false);
|
||||
SetFeeEstimateMode(*pwallet, coin_control, /*conf_target=*/request.params[6], /*estimate_mode=*/request.params[7], /*fee_rate=*/request.params[9], /*override_min_fee=*/false);
|
||||
|
||||
EnsureWalletIsUnlocked(*pwallet);
|
||||
|
||||
@@ -396,7 +396,7 @@ RPCHelpMan sendmany()
|
||||
coin_control.m_signal_bip125_rbf = request.params[5].get_bool();
|
||||
}
|
||||
|
||||
SetFeeEstimateMode(*pwallet, coin_control, /* conf_target */ request.params[6], /* estimate_mode */ request.params[7], /* fee_rate */ request.params[8], /* override_min_fee */ false);
|
||||
SetFeeEstimateMode(*pwallet, coin_control, /*conf_target=*/request.params[6], /*estimate_mode=*/request.params[7], /*fee_rate=*/request.params[8], /*override_min_fee=*/false);
|
||||
|
||||
std::vector<CRecipient> recipients;
|
||||
ParseRecipients(sendTo, subtractFeeFromAmount, recipients);
|
||||
@@ -838,7 +838,7 @@ RPCHelpMan fundrawtransaction()
|
||||
CCoinControl coin_control;
|
||||
// Automatically select (additional) coins. Can be overridden by options.add_inputs.
|
||||
coin_control.m_add_inputs = true;
|
||||
FundTransaction(*pwallet, tx, fee, change_position, request.params[1], coin_control, /* override_min_fee */ true);
|
||||
FundTransaction(*pwallet, tx, fee, change_position, request.params[1], coin_control, /*override_min_fee=*/true);
|
||||
|
||||
UniValue result(UniValue::VOBJ);
|
||||
result.pushKV("hex", EncodeHexTx(CTransaction(tx)));
|
||||
@@ -1043,7 +1043,7 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
|
||||
if (options.exists("replaceable")) {
|
||||
coin_control.m_signal_bip125_rbf = options["replaceable"].get_bool();
|
||||
}
|
||||
SetFeeEstimateMode(*pwallet, coin_control, conf_target, options["estimate_mode"], options["fee_rate"], /* override_min_fee */ false);
|
||||
SetFeeEstimateMode(*pwallet, coin_control, conf_target, options["estimate_mode"], options["fee_rate"], /*override_min_fee=*/false);
|
||||
}
|
||||
|
||||
// Make sure the results are valid at least up to the most recent block
|
||||
@@ -1241,7 +1241,7 @@ RPCHelpMan send()
|
||||
// be overridden by options.add_inputs.
|
||||
coin_control.m_add_inputs = rawTx.vin.size() == 0;
|
||||
SetOptionsInputWeights(options["inputs"], options);
|
||||
FundTransaction(*pwallet, rawTx, fee, change_position, options, coin_control, /* override_min_fee */ false);
|
||||
FundTransaction(*pwallet, rawTx, fee, change_position, options, coin_control, /*override_min_fee=*/false);
|
||||
|
||||
return FinishTransaction(pwallet, options, rawTx);
|
||||
}
|
||||
@@ -1667,7 +1667,7 @@ RPCHelpMan walletcreatefundedpsbt()
|
||||
// be overridden by options.add_inputs.
|
||||
coin_control.m_add_inputs = rawTx.vin.size() == 0;
|
||||
SetOptionsInputWeights(request.params[0], options);
|
||||
FundTransaction(wallet, rawTx, fee, change_position, options, coin_control, /* override_min_fee */ true);
|
||||
FundTransaction(wallet, rawTx, fee, change_position, options, coin_control, /*override_min_fee=*/true);
|
||||
|
||||
// Make a blank psbt
|
||||
PartiallySignedTransaction psbtx(rawTx);
|
||||
|
||||
Reference in New Issue
Block a user