mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
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 <me@gakonst.com> Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
committed by
Georgios Konstantopoulos
parent
12212ec91a
commit
1668313d55
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user