Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify calling add_initial_peers #2945

Merged
merged 2 commits into from
Oct 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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