Skip to content

Commit

Permalink
Fix xcm benchmarking
Browse files Browse the repository at this point in the history
Signed-off-by: Jamie <[email protected]>
  • Loading branch information
Dengjianping committed May 15, 2024
1 parent 087ce65 commit fabb21a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions runtime/calamari/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,12 @@ impl_runtime_apis! {
>;

fn valid_destination() -> Result<MultiLocation, BenchmarkError> {
let mut assets = vec![];
let assets = vec![
MultiAsset {
id: Concrete(KsmLocation::get()),
fun: Fungible(1_000_000 * KMA),
}
];

for (i, asset) in assets.iter().enumerate() {
if let MultiAsset {
Expand All @@ -1585,10 +1590,6 @@ impl_runtime_apis! {
pallet_asset_manager::benchmarking::register_asset_helper::<Runtime>(*location, i as u32);
}
}
assets.push(MultiAsset {
id: Concrete(KsmLocation::get()),
fun: Fungible(1_000_000 * KMA),
});
Ok(KsmLocation::get())
}

Expand Down
11 changes: 6 additions & 5 deletions runtime/manta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,12 @@ impl_runtime_apis! {
>;

fn valid_destination() -> Result<MultiLocation, BenchmarkError> {
let mut assets = vec![];
let assets = vec![
MultiAsset {
id: Concrete(DotLocation::get()),
fun: Fungible(1_000_000 * MANTA),
}
];

for (i, asset) in assets.iter().enumerate() {
if let MultiAsset {
Expand All @@ -1521,10 +1526,6 @@ impl_runtime_apis! {
pallet_asset_manager::benchmarking::register_asset_helper::<Runtime>(*location, i as u32);
}
}
assets.push(MultiAsset {
id: Concrete(DotLocation::get()),
fun: Fungible(1_000_000 * MANTA),
});
Ok(DotLocation::get())
}

Expand Down

0 comments on commit fabb21a

Please sign in to comment.