aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.rs
diff options
context:
space:
mode:
authormurilo ijanc2026-03-25 22:19:32 -0300
committermurilo ijanc2026-03-25 22:19:32 -0300
commit1cc0f3b34c7ff29675d5130a1c17fe5ab7f16ac6 (patch)
tree21178394cbbce34ac0902b6eaa798a8598c535c6 /src/node.rs
parent97cc9c29c3017c7d72d304e4206aefcdf4839c85 (diff)
downloadtesseras-dht-1cc0f3b34c7ff29675d5130a1c17fe5ab7f16ac6.tar.gz
Add unban() to BanList and expose it on Node
Allows callers to clear bans for specific addresses, needed for re-join logic where bootstrap peers may have been banned after transient failures.
Diffstat (limited to 'src/node.rs')
-rw-r--r--src/node.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/node.rs b/src/node.rs
index fef917e..2c3cec9 100644
--- a/src/node.rs
+++ b/src/node.rs
@@ -1165,6 +1165,11 @@ impl Node {
self.peers.len()
}
+ /// Remove a ban for a specific address.
+ pub fn unban(&mut self, addr: &std::net::SocketAddr) {
+ self.ban_list.unban(addr);
+ }
+
/// Snapshot of metrics counters.
pub fn metrics(&self) -> crate::metrics::MetricsSnapshot {
self.metrics.snapshot()