Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
[Fix] Deposit weight hardcoded to pre-bench value (#1651)
Browse files Browse the repository at this point in the history
* [Fix] Deposit weight hardcoded to pre-bench value

* lint
  • Loading branch information
ruseinov authored Sep 21, 2022
1 parent 1418639 commit 3f11a7a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion parachains/runtimes/assets/statemine/src/weights/xcm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ impl<Call> XcmWeightInfo<Call> for StatemineXcmWeight<Call> {
_max_assets: &u32,
_dest: &MultiLocation,
) -> XCMWeight {
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset())
// Hardcoded till the XCM pallet is fixed
let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time();
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset());
cmp::min(hardcoded_weight, weight)
}
fn deposit_reserve_asset(
assets: &MultiAssetFilter,
Expand Down
5 changes: 4 additions & 1 deletion parachains/runtimes/assets/statemint/src/weights/xcm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ impl<Call> XcmWeightInfo<Call> for StatemintXcmWeight<Call> {
_max_assets: &u32,
_dest: &MultiLocation,
) -> XCMWeight {
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset())
// Hardcoded till the XCM pallet is fixed
let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time();
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset());
cmp::min(hardcoded_weight, weight)
}
fn deposit_reserve_asset(
assets: &MultiAssetFilter,
Expand Down
5 changes: 4 additions & 1 deletion parachains/runtimes/assets/westmint/src/weights/xcm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ impl<Call> XcmWeightInfo<Call> for WestmintXcmWeight<Call> {
_max_assets: &u32,
_dest: &MultiLocation,
) -> XCMWeight {
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset())
// Hardcoded till the XCM pallet is fixed
let hardcoded_weight = Weight::from_ref_time(1_000_000_000 as u64).ref_time();
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::deposit_asset());
cmp::min(hardcoded_weight, weight)
}
fn deposit_reserve_asset(
assets: &MultiAssetFilter,
Expand Down

0 comments on commit 3f11a7a

Please sign in to comment.