mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 02:51:01 +00:00
fix checks order when registering parachain (#1177)
This commit is contained in:
committed by
Bastian Köcher
parent
a635048b8a
commit
e5b5679592
@@ -273,13 +273,13 @@ async fn wait_para_state<Relaychain: Chain>(
|
|||||||
Relaychain::NAME,
|
Relaychain::NAME,
|
||||||
)
|
)
|
||||||
})?;
|
})?;
|
||||||
if !from_states.contains(¶_state) {
|
|
||||||
return Err(anyhow::format_err!("Invalid parachain lifecycle: {:?}", para_state))
|
|
||||||
}
|
|
||||||
if para_state == to_state {
|
if para_state == to_state {
|
||||||
log::info!(target: "bridge", "Parachain state is now: {:?}", to_state);
|
log::info!(target: "bridge", "Parachain state is now: {:?}", to_state);
|
||||||
return Ok(())
|
return Ok(())
|
||||||
}
|
}
|
||||||
|
if !from_states.contains(¶_state) {
|
||||||
|
return Err(anyhow::format_err!("Invalid parachain lifecycle: {:?}", para_state))
|
||||||
|
}
|
||||||
|
|
||||||
log::info!(target: "bridge", "Parachain state: {:?}. Waiting for {:?}", para_state, to_state);
|
log::info!(target: "bridge", "Parachain state: {:?}. Waiting for {:?}", para_state, to_state);
|
||||||
async_std::task::sleep(Relaychain::AVERAGE_BLOCK_INTERVAL).await;
|
async_std::task::sleep(Relaychain::AVERAGE_BLOCK_INTERVAL).await;
|
||||||
|
|||||||
Reference in New Issue
Block a user