mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 08:03:39 +00:00
Peers and bans: move queries and actions off the GUI thread #965
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#965
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: #921.
The Peers page polls statistics on the GUI thread.
getNodesStatscan wait for peer locks before its laterTRY_LOCK(cs_main). Disconnect, ban, unban and ban-list refresh also enter backend code; ban changes can write to disk. These are source-confirmed blocking risks.Fetch peer and ban data asynchronously and apply results on the Qt model thread. Limit pending work and avoid continuous polling while the view is inactive. Ignore obsolete results after navigation or shutdown.
Identify action targets by stable peer IDs, addresses or subnets, not row positions. Detail views must remain valid when a list refreshes. Coordinate related commands and refreshes so their results cannot overwrite newer state. Preserve ban-then-disconnect behavior and prevent duplicate submission.
Show pending state and report failures the backend exposes. Do not present an accepted ban as confirmed disk persistence when the API cannot report write failure.
Test delayed reads/actions, hidden and reopened pages, reordered or missing peers, expired bans, failures and shutdown during work. Verify GUI responsiveness and correct action targets.