Unban peers at the swarm level when purged (#2855)

## Issue Addressed
#2840
This commit is contained in:
Divma
2021-12-20 23:45:21 +00:00
parent f721f8d0a0
commit 56d596ee42
10 changed files with 747 additions and 59 deletions

View File

@@ -13,6 +13,13 @@ use std::time::Duration;
use tokio::runtime::Runtime;
use types::{ChainSpec, EnrForkId, EthSpec, ForkContext, Hash256, MinimalEthSpec};
#[allow(clippy::type_complexity)]
#[allow(unused)]
pub mod behaviour;
#[allow(clippy::type_complexity)]
#[allow(unused)]
pub mod swarm;
type E = MinimalEthSpec;
use tempfile::Builder as TempBuilder;
@@ -41,6 +48,7 @@ impl std::ops::DerefMut for Libp2pInstance {
}
}
#[allow(unused)]
pub fn build_log(level: slog::Level, enabled: bool) -> slog::Logger {
let decorator = slog_term::TermDecorator::new().build();
let drain = slog_term::FullFormat::new(decorator).build().fuse();