mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 12:51:02 +00:00
Added origin to config for universal_origin benchmark (#6986)
This commit is contained in:
@@ -2093,7 +2093,7 @@ sp_api::impl_runtime_apis! {
|
|||||||
Err(BenchmarkError::Skip)
|
Err(BenchmarkError::Skip)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn universal_alias() -> Result<Junction, BenchmarkError> {
|
fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> {
|
||||||
// The XCM executor of Kusama doesn't have a configured `UniversalAliases`
|
// The XCM executor of Kusama doesn't have a configured `UniversalAliases`
|
||||||
Err(BenchmarkError::Skip)
|
Err(BenchmarkError::Skip)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2095,7 +2095,7 @@ sp_api::impl_runtime_apis! {
|
|||||||
Err(BenchmarkError::Skip)
|
Err(BenchmarkError::Skip)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn universal_alias() -> Result<Junction, BenchmarkError> {
|
fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> {
|
||||||
// The XCM executor of Rococo doesn't have a configured `UniversalAliases`
|
// The XCM executor of Rococo doesn't have a configured `UniversalAliases`
|
||||||
Err(BenchmarkError::Skip)
|
Err(BenchmarkError::Skip)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1819,7 +1819,7 @@ sp_api::impl_runtime_apis! {
|
|||||||
Err(BenchmarkError::Skip)
|
Err(BenchmarkError::Skip)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn universal_alias() -> Result<Junction, BenchmarkError> {
|
fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> {
|
||||||
// The XCM executor of Westend doesn't have a configured `UniversalAliases`
|
// The XCM executor of Westend doesn't have a configured `UniversalAliases`
|
||||||
Err(BenchmarkError::Skip)
|
Err(BenchmarkError::Skip)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -482,9 +482,9 @@ benchmarks! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
universal_origin {
|
universal_origin {
|
||||||
let alias = T::universal_alias().map_err(|_| BenchmarkError::Skip)?;
|
let (origin, alias) = T::universal_alias().map_err(|_| BenchmarkError::Skip)?;
|
||||||
|
|
||||||
let mut executor = new_executor::<T>(Here.into_location());
|
let mut executor = new_executor::<T>(origin);
|
||||||
|
|
||||||
let instruction = Instruction::UniversalOrigin(alias.clone());
|
let instruction = Instruction::UniversalOrigin(alias.clone());
|
||||||
let xcm = Xcm(vec![instruction]);
|
let xcm = Xcm(vec![instruction]);
|
||||||
|
|||||||
@@ -163,8 +163,8 @@ impl generic::Config for Test {
|
|||||||
Ok(Default::default())
|
Ok(Default::default())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn universal_alias() -> Result<Junction, BenchmarkError> {
|
fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError> {
|
||||||
Ok(GlobalConsensus(ByGenesis([0; 32])))
|
Ok((Here.into(), GlobalConsensus(ByGenesis([0; 32]))))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn transact_origin_and_runtime_call(
|
fn transact_origin_and_runtime_call(
|
||||||
|
|||||||
@@ -52,10 +52,10 @@ pub mod pallet {
|
|||||||
/// If set to `Err`, benchmarks which rely on an `exchange_asset` will be skipped.
|
/// If set to `Err`, benchmarks which rely on an `exchange_asset` will be skipped.
|
||||||
fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError>;
|
fn worst_case_asset_exchange() -> Result<(MultiAssets, MultiAssets), BenchmarkError>;
|
||||||
|
|
||||||
/// A `Junction` that is one of the `UniversalAliases` configured by the XCM executor.
|
/// A `(MultiLocation, Junction)` that is one of the `UniversalAliases` configured by the XCM executor.
|
||||||
///
|
///
|
||||||
/// If set to `Err`, benchmarks which rely on a universal alias will be skipped.
|
/// If set to `Err`, benchmarks which rely on a universal alias will be skipped.
|
||||||
fn universal_alias() -> Result<Junction, BenchmarkError>;
|
fn universal_alias() -> Result<(MultiLocation, Junction), BenchmarkError>;
|
||||||
|
|
||||||
/// The `MultiLocation` and `RuntimeCall` used for successful transaction XCMs.
|
/// The `MultiLocation` and `RuntimeCall` used for successful transaction XCMs.
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user