mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 15:11:02 +00:00
Add support for BHP local and BHK local (#3443)
Related to https://github.com/paritytech/polkadot-sdk/issues/3400 Extracting small parts of https://github.com/paritytech/polkadot-sdk/pull/3429 into separate PR: - Add support for BHP local and BHK local - Increase the timeout for the bridge zomienet tests
This commit is contained in:
@@ -8,11 +8,11 @@ source "${BASH_SOURCE%/*}/../../utils/zombienet.sh"
|
|||||||
${BASH_SOURCE%/*}/../../environments/rococo-westend/spawn.sh --init --start-relayer &
|
${BASH_SOURCE%/*}/../../environments/rococo-westend/spawn.sh --init --start-relayer &
|
||||||
env_pid=$!
|
env_pid=$!
|
||||||
|
|
||||||
ensure_process_file $env_pid $TEST_DIR/rococo.env 400
|
ensure_process_file $env_pid $TEST_DIR/rococo.env 600
|
||||||
rococo_dir=`cat $TEST_DIR/rococo.env`
|
rococo_dir=`cat $TEST_DIR/rococo.env`
|
||||||
echo
|
echo
|
||||||
|
|
||||||
ensure_process_file $env_pid $TEST_DIR/westend.env 180
|
ensure_process_file $env_pid $TEST_DIR/westend.env 300
|
||||||
westend_dir=`cat $TEST_DIR/westend.env`
|
westend_dir=`cat $TEST_DIR/westend.env`
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ source "${BASH_SOURCE%/*}/../../utils/zombienet.sh"
|
|||||||
${BASH_SOURCE%/*}/../../environments/rococo-westend/spawn.sh &
|
${BASH_SOURCE%/*}/../../environments/rococo-westend/spawn.sh &
|
||||||
env_pid=$!
|
env_pid=$!
|
||||||
|
|
||||||
ensure_process_file $env_pid $TEST_DIR/rococo.env 400
|
ensure_process_file $env_pid $TEST_DIR/rococo.env 600
|
||||||
rococo_dir=`cat $TEST_DIR/rococo.env`
|
rococo_dir=`cat $TEST_DIR/rococo.env`
|
||||||
echo
|
echo
|
||||||
|
|
||||||
ensure_process_file $env_pid $TEST_DIR/westend.env 180
|
ensure_process_file $env_pid $TEST_DIR/westend.env 300
|
||||||
westend_dir=`cat $TEST_DIR/westend.env`
|
westend_dir=`cat $TEST_DIR/westend.env`
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ use std::str::FromStr;
|
|||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum BridgeHubRuntimeType {
|
pub enum BridgeHubRuntimeType {
|
||||||
Kusama,
|
Kusama,
|
||||||
|
KusamaLocal,
|
||||||
|
|
||||||
Polkadot,
|
Polkadot,
|
||||||
|
PolkadotLocal,
|
||||||
|
|
||||||
Rococo,
|
Rococo,
|
||||||
RococoLocal,
|
RococoLocal,
|
||||||
@@ -44,7 +47,9 @@ impl FromStr for BridgeHubRuntimeType {
|
|||||||
fn from_str(value: &str) -> Result<Self, Self::Err> {
|
fn from_str(value: &str) -> Result<Self, Self::Err> {
|
||||||
match value {
|
match value {
|
||||||
polkadot::BRIDGE_HUB_POLKADOT => Ok(BridgeHubRuntimeType::Polkadot),
|
polkadot::BRIDGE_HUB_POLKADOT => Ok(BridgeHubRuntimeType::Polkadot),
|
||||||
|
polkadot::BRIDGE_HUB_POLKADOT_LOCAL => Ok(BridgeHubRuntimeType::PolkadotLocal),
|
||||||
kusama::BRIDGE_HUB_KUSAMA => Ok(BridgeHubRuntimeType::Kusama),
|
kusama::BRIDGE_HUB_KUSAMA => Ok(BridgeHubRuntimeType::Kusama),
|
||||||
|
kusama::BRIDGE_HUB_KUSAMA_LOCAL => Ok(BridgeHubRuntimeType::KusamaLocal),
|
||||||
westend::BRIDGE_HUB_WESTEND => Ok(BridgeHubRuntimeType::Westend),
|
westend::BRIDGE_HUB_WESTEND => Ok(BridgeHubRuntimeType::Westend),
|
||||||
westend::BRIDGE_HUB_WESTEND_LOCAL => Ok(BridgeHubRuntimeType::WestendLocal),
|
westend::BRIDGE_HUB_WESTEND_LOCAL => Ok(BridgeHubRuntimeType::WestendLocal),
|
||||||
westend::BRIDGE_HUB_WESTEND_DEVELOPMENT => Ok(BridgeHubRuntimeType::WestendDevelopment),
|
westend::BRIDGE_HUB_WESTEND_DEVELOPMENT => Ok(BridgeHubRuntimeType::WestendDevelopment),
|
||||||
@@ -103,6 +108,7 @@ impl BridgeHubRuntimeType {
|
|||||||
Some("Bob".to_string()),
|
Some("Bob".to_string()),
|
||||||
|_| (),
|
|_| (),
|
||||||
))),
|
))),
|
||||||
|
other => Err(std::format!("No default config present for {:?}", other)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -242,6 +248,7 @@ pub mod rococo {
|
|||||||
/// Sub-module for Kusama setup
|
/// Sub-module for Kusama setup
|
||||||
pub mod kusama {
|
pub mod kusama {
|
||||||
pub(crate) const BRIDGE_HUB_KUSAMA: &str = "bridge-hub-kusama";
|
pub(crate) const BRIDGE_HUB_KUSAMA: &str = "bridge-hub-kusama";
|
||||||
|
pub(crate) const BRIDGE_HUB_KUSAMA_LOCAL: &str = "bridge-hub-kusama-local";
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sub-module for Westend setup.
|
/// Sub-module for Westend setup.
|
||||||
@@ -358,4 +365,5 @@ pub mod westend {
|
|||||||
/// Sub-module for Polkadot setup
|
/// Sub-module for Polkadot setup
|
||||||
pub mod polkadot {
|
pub mod polkadot {
|
||||||
pub(crate) const BRIDGE_HUB_POLKADOT: &str = "bridge-hub-polkadot";
|
pub(crate) const BRIDGE_HUB_POLKADOT: &str = "bridge-hub-polkadot";
|
||||||
|
pub(crate) const BRIDGE_HUB_POLKADOT_LOCAL: &str = "bridge-hub-polkadot-local";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -755,14 +755,16 @@ pub fn run() -> Result<()> {
|
|||||||
.map_err(Into::into),
|
.map_err(Into::into),
|
||||||
|
|
||||||
BridgeHub(bridge_hub_runtime_type) => match bridge_hub_runtime_type {
|
BridgeHub(bridge_hub_runtime_type) => match bridge_hub_runtime_type {
|
||||||
chain_spec::bridge_hubs::BridgeHubRuntimeType::Polkadot =>
|
chain_spec::bridge_hubs::BridgeHubRuntimeType::Polkadot |
|
||||||
|
chain_spec::bridge_hubs::BridgeHubRuntimeType::PolkadotLocal =>
|
||||||
crate::service::start_generic_aura_node::<
|
crate::service::start_generic_aura_node::<
|
||||||
RuntimeApi,
|
RuntimeApi,
|
||||||
AuraId,
|
AuraId,
|
||||||
>(config, polkadot_config, collator_options, id, hwbench)
|
>(config, polkadot_config, collator_options, id, hwbench)
|
||||||
.await
|
.await
|
||||||
.map(|r| r.0),
|
.map(|r| r.0),
|
||||||
chain_spec::bridge_hubs::BridgeHubRuntimeType::Kusama =>
|
chain_spec::bridge_hubs::BridgeHubRuntimeType::Kusama |
|
||||||
|
chain_spec::bridge_hubs::BridgeHubRuntimeType::KusamaLocal =>
|
||||||
crate::service::start_generic_aura_node::<
|
crate::service::start_generic_aura_node::<
|
||||||
RuntimeApi,
|
RuntimeApi,
|
||||||
AuraId,
|
AuraId,
|
||||||
|
|||||||
Reference in New Issue
Block a user