Peer Management: Disconnect, Ban/Unban, and Bans Diagnostics #507

Closed
opened 2026-02-28 16:54:03 +00:00 by johnny9 · 1 comment
johnny9 commented 2026-02-28 16:54:03 +00:00 (Migrated from github.com)

Summary

Deliver full peer control parity for disconnect + ban workflows and banned-peers diagnostics surface.

Complexity

  • L

Dependencies

Global Constraints

  • All implementation lives under gui-qml/.
  • No GUI runtime dependency on bitcoin/src/qt components. Reused logic must be moved/ported into gui-qml/.
  • Do not change interfaces::Wallet or interfaces::Node in this version.
  • Issue completion must satisfy DefinitionOfDone.md.

Scope

  • Add QML actions for disconnect by peer id/address from peer details and peer list contexts.
  • Add ban/unban actions and duration handling.
  • Implement bans list model/view with refresh and unban controls.
  • Wire to interfaces::Node methods only (disconnectById, disconnectByAddress, ban, unban, getBanned).

Acceptance Criteria (DoD-Aligned)

  1. User can disconnect a connected peer from UI and sees immediate state update.
  2. User can ban and unban peers; bans list reflects changes without app restart.
  3. Error states (invalid address, RPC failure, race where peer disconnects first) are surfaced clearly.
  4. No polling loops or blocking calls on UI thread.

Required Tests

  • C++ unit tests: Unit tests for bans/peer action model wrappers around node interface.
  • QML QTest: QTests for peer action button enable/disable logic and status rendering.
  • Python E2E (qml/test/testbridge.h): E2E flow: open peers -> ban peer -> verify bans list -> unban -> verify restored behavior.

Implementation Notes

  • Likely files: qml/models/nodemodel.*, new qml/models/banlistmodel.*, qml/pages/node/Peers.qml, qml/pages/node/PeerDetails.qml.
## Summary Deliver full peer control parity for disconnect + ban workflows and banned-peers diagnostics surface. ## Complexity - `L` ## Dependencies - #505 - #506 ## Global Constraints - All implementation lives under `gui-qml/`. - No GUI runtime dependency on `bitcoin/src/qt` components. Reused logic must be moved/ported into `gui-qml/`. - Do not change `interfaces::Wallet` or `interfaces::Node` in this version. - Issue completion must satisfy `DefinitionOfDone.md`. ## Scope - Add QML actions for disconnect by peer id/address from peer details and peer list contexts. - Add ban/unban actions and duration handling. - Implement bans list model/view with refresh and unban controls. - Wire to `interfaces::Node` methods only (`disconnectById`, `disconnectByAddress`, `ban`, `unban`, `getBanned`). ## Acceptance Criteria (DoD-Aligned) 1. User can disconnect a connected peer from UI and sees immediate state update. 2. User can ban and unban peers; bans list reflects changes without app restart. 3. Error states (invalid address, RPC failure, race where peer disconnects first) are surfaced clearly. 4. No polling loops or blocking calls on UI thread. ## Required Tests - C++ unit tests: Unit tests for bans/peer action model wrappers around node interface. - QML QTest: QTests for peer action button enable/disable logic and status rendering. - Python E2E (`qml/test/testbridge.h`): E2E flow: open peers -> ban peer -> verify bans list -> unban -> verify restored behavior. ## Implementation Notes - Likely files: `qml/models/nodemodel.*`, new `qml/models/banlistmodel.*`, `qml/pages/node/Peers.qml`, `qml/pages/node/PeerDetails.qml`.
johnny9 commented 2026-05-11 16:23:36 +00:00 (Migrated from github.com)
https://github.com/bitcoin-core/gui-qml/pull/529
Sign in to join this conversation.
No description provided.