Skip to content

Commit

Permalink
Simplify calling add_initial_peers (#2945)
Browse files Browse the repository at this point in the history
Co-authored-by: Conrado Gouvea <[email protected]>
  • Loading branch information
teor2345 and conradoplg authored Oct 25, 2021
1 parent c7a5db3 commit c2734f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zebra-network/src/peer_set/initialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down Expand Up @@ -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>
Expand All @@ -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;
Expand Down

0 comments on commit c2734f5

Please sign in to comment.