mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 07:54:42 +00:00
Node information: display cached data and refresh asynchronously #963
Labels
No labels
Android
Bug
Build system
Design suggestion
Doc
Needs design review
Needs rebase
Stage
UX
Up for grabs
Upstream
Wallet
duplicate
enhancement
good first issue
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin-core/gui-qml#963
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #576.
Opening Node information can stop the GUI while it reads live backend state. A chain-lock wait was observed during initial block download. Row construction calls
getHeaderTip,getNumBlocks,getLastBlockTime,getNetLocalAddresses, shared path/settings getters andgetNetworkActive.Build rows from cached values and refresh them asynchronously. Opening the popup should show available data immediately, with a clear unavailable state before the first result. Repeated openings must not create unbounded backend work. Ignore results that no longer match the active node or application state.
Reuse shared chain, network, connection and warning data where practical. Keep GUI getters and completion callbacks free of backend queries, including fallback paths. Remove unused byte-counter APIs or make them follow the same cached-read contract. Preserve existing worker coverage for traffic, mempool and debug-log reads.
Test opening and reopening the popup while a backend read is blocked. Cover startup, empty results, newer notifications during a read, backend errors and shutdown. Verify GUI responsiveness and repeat the popup action during initial block download.
The cached node information also needs to handle the best header moving backwards. On merged
qt6at6e54a48ab571,invalidateblockleaves QML displaying a header that Core has discarded.In isolated regtest:
blocks: 170,headers: 170andinitialblockdownload: false. Node information shows Block height 170 but Header height 200, retaining the invalid tip's header time.A 20-block rewind still leaves the stale header row, but does not trigger the stuck synchronization display. Reconsidering the invalidated block, mining a new valid block, or restarting restores the correct state.
The header cache is updated from header notifications and the startup snapshot. The block-tip update does not refresh it after invalidation, so synchronization completion can keep waiting for the discarded header. Current #985 and #994 source still retain this gap; those PR builds were not runtime-tested here.
Please reconcile the cached best header after invalidation through the asynchronous refresh path, and cover both the information rows and synchronization completion. This reproduction uses the explicit debug RPC; it does not establish that ordinary reorganizations cause the same symptom.