[Fix] Deposit weight hardcoded to pre-bench value (#1651) (#1656)

* [Fix] Deposit weight hardcoded to pre-bench value

* lint

Co-authored-by: Roman Useinov <roman.useinov@gmail.com>
This commit is contained in:
Squirrel
2022-09-21 12:43:23 +01:00
committed by GitHub
parent b5cf145524
commit 0fbcbbd90b
3 changed files with 12 additions and 3 deletions
@@ -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,
@@ -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,
@@ -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,