Simplify calling `add_initial_peers` (#2945)

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
This commit is contained in:
teor 2021-10-26 06:16:35 +10:00 committed by GitHub
parent c7a5db3c24
commit c2734f5661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ where
let config = config.clone();
let outbound_connector = outbound_connector.clone();
let peerset_tx = peerset_tx.clone();
async move { add_initial_peers(&config, outbound_connector, peerset_tx).await }.boxed()
add_initial_peers(config, outbound_connector, peerset_tx)
};
let initial_peers_join = tokio::spawn(initial_peers_fut.instrument(Span::current()));
@ -196,7 +196,7 @@ where
/// then send the resulting peer connections over `peerset_tx`.
#[instrument(skip(config, outbound_connector, peerset_tx))]
async fn add_initial_peers<S>(
config: &Config,
config: Config,
outbound_connector: S,
mut peerset_tx: mpsc::Sender<PeerChange>,
) -> Result<ActiveConnectionCounter, BoxError>
@ -208,7 +208,7 @@ where
> + Clone,
S::Future: Send + 'static,
{
let initial_peers = limit_initial_peers(config).await;
let initial_peers = limit_initial_peers(&config).await;
let mut handshake_success_total: usize = 0;
let mut handshake_error_total: usize = 0;