Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
supernovahs committed Jan 5, 2024
1 parent 9bd89f9 commit e7dbc1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions crates/net/discv5/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ pub use discv5::{
enr, enr::CombinedKey, service::Service, Config as Discv5Config,
ConfigBuilder as Discv5ConfigBuilder, Discv5, Enr, Event,
};
use futures_util::{StreamExt, TryFutureExt};
use futures_util::StreamExt;
use k256::ecdsa::SigningKey;
use parking_lot::Mutex;
use secp256k1::SecretKey;
use std::{
default::Default,
fmt,
pin::Pin,
sync::Arc,
task::{Context, Poll},
};
use tokio::sync::mpsc;
Expand Down
10 changes: 5 additions & 5 deletions crates/net/network/src/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use crate::{
manager::DiscoveredEvent,
};
use futures::{stream::Stream, StreamExt};
use k256::ecdsa::SigningKey;
// use k256::ecdsa::SigningKey;
use reth_discv4::{DiscoveryUpdate, Discv4, Discv4Config, EnrForkIdEntry};
use reth_discv5::{CombinedKey, Discv5, Discv5Config, Discv5Error, Discv5Handle, Event};
use reth_discv5::{Discv5Config, Discv5Handle, Event};
use reth_dns_discovery::{
DnsDiscoveryConfig, DnsDiscoveryHandle, DnsDiscoveryService, DnsNodeRecordUpdate, DnsResolver,
};
Expand Down Expand Up @@ -85,7 +85,7 @@ impl Discovery {
};

// setup discv5
let (discv5, discv5_event_stream) = if let Some(discv5_config) = discv5_config {
let (discv5, _discv5_event_stream) = if let Some(discv5_config) = discv5_config {
let mut discv5 = Discv5Handle::from_secret_key(sk, discv5_config)?;
discv5.start_service().await.unwrap();
let discv5_event_stream = discv5.create_event_stream().await.unwrap();
Expand Down Expand Up @@ -222,7 +222,7 @@ impl Discovery {
id: node_id,
};
self.on_node_record_update(node_record, None)
} // #5576 handle replaced variable
}
Event::EnrAdded { enr, replaced } => {
if let Some(discv5) = &self.discv5 {
let discv5 = Discv5Handle::convert_to_discv5(discv5);
Expand All @@ -232,7 +232,7 @@ impl Discovery {
discv5.remove_node(&node_id);
}
}
} // #5576 handle replaced variable
}
Event::NodeInserted { node_id, replaced } => {
if let Some(discv5) = &self.discv5 {
let discv5 = Discv5Handle::convert_to_discv5(discv5);
Expand Down

0 comments on commit e7dbc1e

Please sign in to comment.