From 1668313d554863eef422a6f4fee4a46c1529a9a4 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 2 Dec 2022 16:22:45 +0100 Subject: [PATCH] perf(disc): instantly lookup self in DHT (#314) * perf(disc): instantly lookup self in DHT * Update crates/net/discv4/src/lib.rs Co-authored-by: Georgios Konstantopoulos Co-authored-by: Georgios Konstantopoulos --- crates/net/discv4/src/lib.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/crates/net/discv4/src/lib.rs b/crates/net/discv4/src/lib.rs index 4f86c53937..9371e35806 100644 --- a/crates/net/discv4/src/lib.rs +++ b/crates/net/discv4/src/lib.rs @@ -319,12 +319,7 @@ impl Discv4Service { None, ); - // delay the first lookup for a bit to give the bootstrap process a chance to resolve - // entries first - let self_lookup_interval = tokio::time::interval_at( - tokio::time::Instant::now() + config.ping_timeout / 2, - config.lookup_interval, - ); + let self_lookup_interval = tokio::time::interval(config.lookup_interval); let ping_interval = tokio::time::interval(config.ping_interval);