mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
chore(clippy): make clippy happy (#1710)
This commit is contained in:
@@ -169,7 +169,7 @@ impl SessionManager {
|
||||
where
|
||||
F: Future<Output = ()> + Send + 'static,
|
||||
{
|
||||
self.executor.spawn(async move { f.await }.boxed());
|
||||
self.executor.spawn(f.boxed());
|
||||
}
|
||||
|
||||
/// Invoked on a received status update.
|
||||
@@ -209,20 +209,17 @@ impl SessionManager {
|
||||
let hello_message = self.hello_message.clone();
|
||||
let status = self.status;
|
||||
let fork_filter = self.fork_filter.clone();
|
||||
self.spawn(async move {
|
||||
start_pending_incoming_session(
|
||||
disconnect_rx,
|
||||
session_id,
|
||||
metered_stream,
|
||||
pending_events,
|
||||
remote_addr,
|
||||
secret_key,
|
||||
hello_message,
|
||||
status,
|
||||
fork_filter,
|
||||
)
|
||||
.await
|
||||
});
|
||||
self.spawn(start_pending_incoming_session(
|
||||
disconnect_rx,
|
||||
session_id,
|
||||
metered_stream,
|
||||
pending_events,
|
||||
remote_addr,
|
||||
secret_key,
|
||||
hello_message,
|
||||
status,
|
||||
fork_filter,
|
||||
));
|
||||
|
||||
let handle = PendingSessionHandle {
|
||||
disconnect_tx: Some(disconnect_tx),
|
||||
@@ -243,21 +240,18 @@ impl SessionManager {
|
||||
let fork_filter = self.fork_filter.clone();
|
||||
let status = self.status;
|
||||
let band_with_meter = self.bandwidth_meter.clone();
|
||||
self.spawn(async move {
|
||||
start_pending_outbound_session(
|
||||
disconnect_rx,
|
||||
pending_events,
|
||||
session_id,
|
||||
remote_addr,
|
||||
remote_peer_id,
|
||||
secret_key,
|
||||
hello_message,
|
||||
status,
|
||||
fork_filter,
|
||||
band_with_meter,
|
||||
)
|
||||
.await
|
||||
});
|
||||
self.spawn(start_pending_outbound_session(
|
||||
disconnect_rx,
|
||||
pending_events,
|
||||
session_id,
|
||||
remote_addr,
|
||||
remote_peer_id,
|
||||
secret_key,
|
||||
hello_message,
|
||||
status,
|
||||
fork_filter,
|
||||
band_with_meter,
|
||||
));
|
||||
|
||||
let handle = PendingSessionHandle {
|
||||
disconnect_tx: Some(disconnect_tx),
|
||||
|
||||
@@ -77,7 +77,7 @@ where
|
||||
&mut self,
|
||||
configs: impl IntoIterator<Item = PeerConfig<C>>,
|
||||
) -> Result<(), NetworkError> {
|
||||
let peers = configs.into_iter().map(|c| async { c.launch().await }).collect::<Vec<_>>();
|
||||
let peers = configs.into_iter().map(|c| c.launch()).collect::<Vec<_>>();
|
||||
let peers = futures::future::join_all(peers).await;
|
||||
for peer in peers {
|
||||
self.peers.push(peer?);
|
||||
|
||||
@@ -431,6 +431,8 @@ where
|
||||
let pool_transaction = <Pool::Transaction as FromRecoveredTransaction>::from_recovered_transaction(tx);
|
||||
|
||||
let pool = self.pool.clone();
|
||||
|
||||
#[allow(clippy::redundant_async_block)]
|
||||
let import = Box::pin(async move {
|
||||
pool.add_external_transaction(pool_transaction).await
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user