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.
11 files changed
+173
-5
4286590f
→
d88ef3fa
modified CHANGELOG.md
@@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-node/src/control.rs
@@ -170,6 +170,14 @@ where
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-node/src/runtime/handle.rs
@@ -247,6 +247,12 @@ impl radicle::node::Handle for Handle {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-node/src/test/handle.rs
@@ -18,6 +18,7 @@ pub struct Handle {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -85,6 +86,7 @@ impl radicle::node::Handle for Handle {
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -93,7 +95,14 @@ impl radicle::node::Handle for Handle {
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-node/src/tests/e2e.rs
@@ -1663,3 +1663,85 @@ fn test_non_fastforward_identity_doc() {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
modified crates/radicle-protocol/src/service.rs
@@ -230,6 +230,8 @@ pub enum ConnectError {
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -856,6 +858,16 @@ where
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -1212,6 +1224,12 @@ where
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -1344,6 +1362,7 @@ where
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -2153,6 +2172,9 @@ where
|
|
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -2386,6 +2408,7 @@ where
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -2553,6 +2576,9 @@ where
|
|
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -2684,6 +2710,8 @@ pub enum DisconnectReason {
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -2712,6 +2740,7 @@ impl fmt::Display for DisconnectReason {
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified crates/radicle-protocol/src/service/command.rs
@@ -99,6 +99,8 @@ pub enum Command {
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -194,6 +196,7 @@ impl fmt::Debug for Command {
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified crates/radicle/CHANGELOG.md
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
modified crates/radicle/src/node.rs
@@ -907,6 +907,8 @@ pub trait Handle: Clone + Sync + Send {
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -1191,6 +1193,13 @@ impl Handle for Node {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle/src/node/command.rs
@@ -120,6 +120,10 @@ pub enum Command {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle/src/node/policy/store.rs
@@ -119,14 +119,15 @@ impl Store<Write> {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
@@ -248,6 +249,18 @@ impl<T> Store<T> {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|