qml: Require a custom fee when fees cannot be estimated

bitcoin-core/gui-qml: PR #1092

1 minor finding · 1 suggestion

Findings

Link

[minor] · Block retries can leave Review disabled after estimates recover

A block arriving during a pending request, or switching to a preset with stale unavailability, can delay Review until another block; mixed preset availability has not been observed on a running node.

Location: qml/pages/wallet/SendCreate.qml:226 (head).

Details and suggested fix

If a request reads unavailable state before a block makes estimates available, the height notification is discarded while feeEstimatePending is true. Applying the old result clears pending without scheduling a follow-up, so Review remains disabled. There is also a preset-switch case: blocks do not refresh an unavailable target while an available target is selected, and switching between presets schedules nothing. The cached unavailable entry then disables Review until another block. Editing the form or toggling Custom provides a workaround; on mainnet, waiting for another block can mean roughly ten additional minutes.

Keep the pending guard, but remember skipped block retries and schedule one follow-up when the request completes. Also schedule a refresh when selecting a cached-unavailable preset. Simply removing the guard would let repeated tips restart the debounce timer.


Optional improvements

Link

[suggestion] · Estimator recovery with fallback disabled lacks a regression test

The new model test clears unavailability by enabling fallback, so it does not protect recovery when the estimator succeeds under the default fallback-disabled policy.

Location: test/test_walletqmlmodel.cpp:1156 (head).

Details and suggested fix

get_fee_reason_fn returns FeeReason::FALLBACK throughout this test. Its recovery phase therefore checks the fallback-permission branch, not the distinction between missing and successful estimates. Removing the reason check from NetworkFeeEstimateUnavailable() would still satisfy these assertions. Add a phase that keeps m_allow_fallback_fee false, returns FeeReason::FEE_RATE_ESTIMATOR with a positive mocked rate, and reuses the successful transaction stub. After scheduling and awaiting completion, assert that unavailability clears, the preview is populated, and a QSignalSpy observes estimatedFeeChanged, which notifies the QML availability binding.


Coverage details