node: add block command to control socket
Introduces the ability to explicitly block a peer via the node control socket. Previously, the node only exposed follow and unfollow commands. While the underlying policy database schema supported a Block variant, there was no mechanism to trigger this state via the client handle.
The new block command:
- Updates the node’s follow policy to Block.
- Immediately disconnects the peer if a session is active.
- Prevents future inbound and outbound connections to that peer.
- Filters the peer out of the available peers list.
Introduces the ability to explicitly block a peer via the node control socket. Previously, the node only exposed follow and unfollow commands. While the underlying policy database schema supported a Block variant, there was no mechanism to trigger this state via the client handle.
The new block command:
- Updates the node’s follow policy to Block.
- Immediately disconnects the peer if a session is active.
- Prevents future inbound and outbound connections to that peer.
- Filters the peer out of the available peers list.
REVIEW
Changes:
- Squash review commits into their respective parents
- Split the changes between adding the command and making changes to the service
- Emit
Event::PeerDisconnectedinstead ofEvent::PeerConnectedinService::connected, when peer is blocked - Adds fix to test harness code to allow for the case of a blocked peer
Rebase