mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
[Fix] Hardcode teleport weight until XCM pallet is fixed (#1641)
* [Fix] Hardcode teleport weight until XCM pallet is fixed * fix build * solve dead code * fix lint * more eloquent weights * quick fix
This commit is contained in:
@@ -21,7 +21,7 @@ use crate::Runtime;
|
|||||||
use frame_support::weights::Weight;
|
use frame_support::weights::Weight;
|
||||||
use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight;
|
use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight;
|
||||||
use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric;
|
use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric;
|
||||||
use sp_std::prelude::*;
|
use sp_std::{cmp, prelude::*};
|
||||||
use xcm::{
|
use xcm::{
|
||||||
latest::{prelude::*, Weight as XCMWeight},
|
latest::{prelude::*, Weight as XCMWeight},
|
||||||
DoubleEncoded,
|
DoubleEncoded,
|
||||||
@@ -142,7 +142,10 @@ impl<Call> XcmWeightInfo<Call> for StatemineXcmWeight<Call> {
|
|||||||
_dest: &MultiLocation,
|
_dest: &MultiLocation,
|
||||||
_xcm: &Xcm<()>,
|
_xcm: &Xcm<()>,
|
||||||
) -> XCMWeight {
|
) -> XCMWeight {
|
||||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_teleport())
|
// Hardcoded till the XCM pallet is fixed
|
||||||
|
let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64).ref_time();
|
||||||
|
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_teleport());
|
||||||
|
cmp::min(hardcoded_weight, weight)
|
||||||
}
|
}
|
||||||
fn query_holding(
|
fn query_holding(
|
||||||
_query_id: &u64,
|
_query_id: &u64,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ use crate::Runtime;
|
|||||||
use frame_support::weights::Weight;
|
use frame_support::weights::Weight;
|
||||||
use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight;
|
use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight;
|
||||||
use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric;
|
use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric;
|
||||||
use sp_std::prelude::*;
|
use sp_std::{cmp, prelude::*};
|
||||||
use xcm::{
|
use xcm::{
|
||||||
latest::{prelude::*, Weight as XCMWeight},
|
latest::{prelude::*, Weight as XCMWeight},
|
||||||
DoubleEncoded,
|
DoubleEncoded,
|
||||||
@@ -142,7 +142,10 @@ impl<Call> XcmWeightInfo<Call> for StatemintXcmWeight<Call> {
|
|||||||
_dest: &MultiLocation,
|
_dest: &MultiLocation,
|
||||||
_xcm: &Xcm<()>,
|
_xcm: &Xcm<()>,
|
||||||
) -> XCMWeight {
|
) -> XCMWeight {
|
||||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_teleport())
|
// Hardcoded till the XCM pallet is fixed
|
||||||
|
let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64).ref_time();
|
||||||
|
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_teleport());
|
||||||
|
cmp::min(hardcoded_weight, weight)
|
||||||
}
|
}
|
||||||
fn query_holding(
|
fn query_holding(
|
||||||
_query_id: &u64,
|
_query_id: &u64,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ use crate::Runtime;
|
|||||||
use frame_support::weights::Weight;
|
use frame_support::weights::Weight;
|
||||||
use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight;
|
use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight;
|
||||||
use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric;
|
use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric;
|
||||||
use sp_std::prelude::*;
|
use sp_std::{cmp, prelude::*};
|
||||||
use xcm::{
|
use xcm::{
|
||||||
latest::{prelude::*, Weight as XCMWeight},
|
latest::{prelude::*, Weight as XCMWeight},
|
||||||
DoubleEncoded,
|
DoubleEncoded,
|
||||||
@@ -142,7 +142,10 @@ impl<Call> XcmWeightInfo<Call> for WestmintXcmWeight<Call> {
|
|||||||
_dest: &MultiLocation,
|
_dest: &MultiLocation,
|
||||||
_xcm: &Xcm<()>,
|
_xcm: &Xcm<()>,
|
||||||
) -> XCMWeight {
|
) -> XCMWeight {
|
||||||
assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_teleport())
|
// Hardcoded till the XCM pallet is fixed
|
||||||
|
let hardcoded_weight = Weight::from_ref_time(200_000_000 as u64).ref_time();
|
||||||
|
let weight = assets.weigh_multi_assets(XcmFungibleWeight::<Runtime>::initiate_teleport());
|
||||||
|
cmp::min(hardcoded_weight, weight)
|
||||||
}
|
}
|
||||||
fn query_holding(
|
fn query_holding(
|
||||||
_query_id: &u64,
|
_query_id: &u64,
|
||||||
|
|||||||
Reference in New Issue
Block a user