mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
perf: increase refill slots interval (#4528)
This commit is contained in:
@ -759,9 +759,7 @@ impl PeersManager {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.refill_slots_interval.poll_tick(cx).is_ready() {
|
while self.refill_slots_interval.poll_tick(cx).is_ready() {
|
||||||
// this ensures the manager will be polled periodically, see [Interval::poll_tick]
|
|
||||||
let _ = self.refill_slots_interval.poll_tick(cx);
|
|
||||||
self.fill_outbound_slots();
|
self.fill_outbound_slots();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1101,7 +1099,7 @@ pub struct PeersConfig {
|
|||||||
impl Default for PeersConfig {
|
impl Default for PeersConfig {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
refill_slots_interval: Duration::from_millis(1_000),
|
refill_slots_interval: Duration::from_millis(5_000),
|
||||||
connection_info: Default::default(),
|
connection_info: Default::default(),
|
||||||
reputation_weights: Default::default(),
|
reputation_weights: Default::default(),
|
||||||
ban_list: Default::default(),
|
ban_list: Default::default(),
|
||||||
|
|||||||
Reference in New Issue
Block a user