Fixed ban mechanism, updated dependencies.
This commit is contained in:
@@ -49,4 +49,4 @@ pub const MIN_CONNECTED_NODES_START_SYNC: usize = 4;
|
||||
pub const MAX_READ_BLOCK_TIME: u128 = 100;
|
||||
pub const MAX_RECONNECTS: u32 = 5;
|
||||
pub const MAX_IDLE_SECONDS: u64 = 180;
|
||||
pub const MAX_NODES: usize = 25;
|
||||
pub const MAX_NODES: usize = 20;
|
||||
|
||||
+2
-1
@@ -268,9 +268,10 @@ impl Peers {
|
||||
}
|
||||
|
||||
// Just purging ignored/banned IPs every 10 minutes
|
||||
// TODO make it individual
|
||||
// TODO make it individual for every IP
|
||||
if self.ignore_timer.elapsed().as_secs() >= 600 {
|
||||
self.ignored.clear();
|
||||
self.ignore_timer = Instant::now();
|
||||
}
|
||||
|
||||
// If someone has more blocks we sync
|
||||
|
||||
Reference in New Issue
Block a user