In an unmerged branch of #32636 (https://github.com/bitcoin/bitcoin/commit/097e00f90765915b0f8353a4eb5ebb18ceae2a66) I unintentionally broke default -fallbackfee behavior, but this was not caught by any tests. See #32636 (review).
Something like the following diff does not cause any test failures on master despite causing a behavior change:
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index bc27018cd2..079610fba0 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -3048,24 +3048,24 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri
if (const auto arg{args.GetArg("-fallbackfee")}) {
std::optional<CAmount> fallback_fee = ParseMoney(*arg);
if (!fallback_fee) {
error = strprintf(_("Invalid amount for %s=<amount>: '%s'"), "-fallbackfee", *arg);
return nullptr;
} else if (fallback_fee.value() > HIGH_TX_FEE_PER_KB) {
warnings.push_back(AmountHighWarn("-fallbackfee") + Untranslated(" ") +
_("This is the transaction fee you may pay when fee estimates are not available."));
}
walletInstance->m_fallback_fee = CFeeRate{fallback_fee.value()};
+ // Disable fallback fee in case value was set to 0, enable if non-null value
+ walletInstance->m_allow_fallback_fee = walletInstance->m_fallback_fee.GetFeePerK() != 0;
}
- // Disable fallback fee in case value was set to 0, enable if non-null value
- walletInstance->m_allow_fallback_fee = walletInstance->m_fallback_fee.GetFeePerK() != 0;
This PR adds a functional test check that when no -fallbackfee argument is set and fee estimation is not possible, that sending fails because -fallbackfee is disabled by default.