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

[Easy] futures -> tokio select #2366

Merged
merged 1 commit into from
Dec 7, 2024
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
8 changes: 4 additions & 4 deletions sequencer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ use espresso_types::{
traits::EventConsumer, BackoffParams, L1ClientOptions, NodeState, PubKey, SeqTypes,
SolverAuctionResultsProvider, ValidatedState,
};
use futures::FutureExt;
use genesis::L1Finalized;
use hotshot::traits::election::static_committee::StaticCommittee;
use hotshot_types::traits::election::Membership;
use std::sync::Arc;
use tokio::select;
// Should move `STAKE_TABLE_CAPACITY` in the sequencer repo when we have variate stake table support
use libp2p::Multiaddr;
use network::libp2p::split_off_peer_id;
Expand Down Expand Up @@ -469,11 +469,11 @@ pub async fn init_node<P: SequencerPersistence, V: Versions>(
})?;

tracing::warn!("Waiting for at least one connection to be initialized");
futures::select! {
_ = cdn_network.wait_for_ready().fuse() => {
select! {
_ = cdn_network.wait_for_ready() => {
tracing::warn!("CDN connection initialized");
},
_ = p2p_network.wait_for_ready().fuse() => {
_ = p2p_network.wait_for_ready() => {
tracing::warn!("P2P connection initialized");
},
};
Expand Down
Loading