mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
scripted-diff: rename m_default_max_tx_fee
to m_max_tx_fee
-BEGIN VERIFY SCRIPT- git grep -l "m_default_max_tx_fee" src | xargs sed -i "s/m_default_max_tx_fee/m_max_tx_fee/g" -END VERIFY SCRIPT- - The value is not always the default but can be configured during startup so `m_max_tx_fee` is the right name not `m_default_max_tx_fee`.
This commit is contained in:
parent
5acf12bafe
commit
3db6882017
7 changed files with 9 additions and 9 deletions
|
@ -228,7 +228,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
|
|||
|
||||
// Reject absurdly high fee. (This can never happen because the
|
||||
// wallet never creates transactions with fee greater than
|
||||
// m_default_max_tx_fee. This merely a belt-and-suspenders check).
|
||||
// m_max_tx_fee. This merely a belt-and-suspenders check).
|
||||
if (nFeeRequired > m_wallet->getDefaultMaxTxFee()) {
|
||||
return AbsurdFee;
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ static feebumper::Result CheckFeeRate(const CWallet& wallet, const CMutableTrans
|
|||
}
|
||||
|
||||
// Check that in all cases the new fee doesn't violate maxTxFee
|
||||
const CAmount max_tx_fee = wallet.m_default_max_tx_fee;
|
||||
const CAmount max_tx_fee = wallet.m_max_tx_fee;
|
||||
if (new_total_fee > max_tx_fee) {
|
||||
errors.push_back(Untranslated(strprintf("Specified or calculated fee %s is too high (cannot be higher than -maxtxfee %s)",
|
||||
FormatMoney(new_total_fee), FormatMoney(max_tx_fee))));
|
||||
|
|
|
@ -521,7 +521,7 @@ public:
|
|||
return spk_man != nullptr;
|
||||
}
|
||||
OutputType getDefaultAddressType() override { return m_wallet->m_default_address_type; }
|
||||
CAmount getDefaultMaxTxFee() override { return m_wallet->m_default_max_tx_fee; }
|
||||
CAmount getDefaultMaxTxFee() override { return m_wallet->m_max_tx_fee; }
|
||||
void remove() override
|
||||
{
|
||||
RemoveWallet(m_context, m_wallet, /*load_on_start=*/false);
|
||||
|
|
|
@ -439,7 +439,7 @@ RPCHelpMan settxfee()
|
|||
|
||||
CAmount nAmount = AmountFromValue(request.params[0]);
|
||||
CFeeRate tx_fee_rate(nAmount, 1000);
|
||||
CFeeRate max_tx_fee_rate(pwallet->m_default_max_tx_fee, 1000);
|
||||
CFeeRate max_tx_fee_rate(pwallet->m_max_tx_fee, 1000);
|
||||
if (tx_fee_rate == CFeeRate(0)) {
|
||||
// automatic selection
|
||||
} else if (tx_fee_rate < pwallet->chain().relayMinFee()) {
|
||||
|
@ -1504,7 +1504,7 @@ RPCHelpMan sendall()
|
|||
const std::optional<CAmount> total_bump_fees{pwallet->chain().calculateCombinedBumpFee(outpoints_spent, fee_rate)};
|
||||
CAmount effective_value = total_input_value - fee_from_size - total_bump_fees.value_or(0);
|
||||
|
||||
if (fee_from_size > pwallet->m_default_max_tx_fee) {
|
||||
if (fee_from_size > pwallet->m_max_tx_fee) {
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, TransactionErrorString(TransactionError::MAX_FEE_EXCEEDED).original);
|
||||
}
|
||||
|
||||
|
|
|
@ -1339,7 +1339,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
|
|||
return util::Error{_("Transaction too large")};
|
||||
}
|
||||
|
||||
if (current_fee > wallet.m_default_max_tx_fee) {
|
||||
if (current_fee > wallet.m_max_tx_fee) {
|
||||
return util::Error{TransactionErrorString(TransactionError::MAX_FEE_EXCEEDED)};
|
||||
}
|
||||
|
||||
|
|
|
@ -2053,7 +2053,7 @@ bool CWallet::SubmitTxMemoryPoolAndRelay(CWalletTx& wtx, std::string& err_string
|
|||
// If broadcast fails for any reason, trying to set wtx.m_state here would be incorrect.
|
||||
// If transaction was previously in the mempool, it should be updated when
|
||||
// TransactionRemovedFromMempool fires.
|
||||
bool ret = chain().broadcastTransaction(wtx.tx, m_default_max_tx_fee, relay, err_string);
|
||||
bool ret = chain().broadcastTransaction(wtx.tx, m_max_tx_fee, relay, err_string);
|
||||
if (ret) wtx.m_state = TxStateInMempool{};
|
||||
return ret;
|
||||
}
|
||||
|
@ -3200,7 +3200,7 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
walletInstance->m_default_max_tx_fee = max_fee.value();
|
||||
walletInstance->m_max_tx_fee = max_fee.value();
|
||||
}
|
||||
|
||||
if (args.IsArgSet("-consolidatefeerate")) {
|
||||
|
|
|
@ -728,7 +728,7 @@ public:
|
|||
*/
|
||||
std::optional<OutputType> m_default_change_type{};
|
||||
/** Absolute maximum transaction fee (in satoshis) used by default for the wallet */
|
||||
CAmount m_default_max_tx_fee{DEFAULT_TRANSACTION_MAXFEE};
|
||||
CAmount m_max_tx_fee{DEFAULT_TRANSACTION_MAXFEE};
|
||||
|
||||
/** Number of pre-generated keys/scripts by each spkm (part of the look-ahead process, used to detect payments) */
|
||||
int64_t m_keypool_size{DEFAULT_KEYPOOL_SIZE};
|
||||
|
|
Loading…
Add table
Reference in a new issue