Skip to content

Commit

Permalink
fix checks order when registering parachain (paritytech#1177)
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatonik authored and serban300 committed Apr 8, 2024
1 parent 27f2be8 commit 362707e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bridges/relays/bin-substrate/src/cli/register_parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@ async fn wait_para_state<Relaychain: Chain>(
Relaychain::NAME,
)
})?;
if !from_states.contains(&para_state) {
return Err(anyhow::format_err!("Invalid parachain lifecycle: {:?}", para_state))
}
if para_state == to_state {
log::info!(target: "bridge", "Parachain state is now: {:?}", to_state);
return Ok(())
}
if !from_states.contains(&para_state) {
return Err(anyhow::format_err!("Invalid parachain lifecycle: {:?}", para_state))
}

log::info!(target: "bridge", "Parachain state: {:?}. Waiting for {:?}", para_state, to_state);
async_std::task::sleep(Relaychain::AVERAGE_BLOCK_INTERVAL).await;
Expand Down

0 comments on commit 362707e

Please sign in to comment.