mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 23:47:56 +00:00
Companion for Weight v1.5 (#5943)
* fix to latest substrate pr
* update weights
* cargo build -p polkadot-runtime-parachains
* fix xcm-builder
* fix import
* fix a bunch
* fix a bunch of weight stuff
* kusama compile
* unused
* builds
* maybe fix
* cargo test -p polkadot-runtime-parachains
* xcm simulator example
* fix tests
* xcm sim fuzz
* fix runtime tests
* remove unused
* fix integration tests
* scalar div
* update lockfile for {"substrate"}
Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -97,8 +97,8 @@ impl pallet_balances::Config for Runtime {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND / 4;
|
||||
pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND / 4;
|
||||
pub const ReservedXcmpWeight: Weight = WEIGHT_PER_SECOND.scalar_div(4);
|
||||
pub const ReservedDmpWeight: Weight = WEIGHT_PER_SECOND.scalar_div(4);
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -120,7 +120,7 @@ pub type XcmOriginToCallOrigin = (
|
||||
);
|
||||
|
||||
parameter_types! {
|
||||
pub const UnitWeightCost: Weight = 1;
|
||||
pub const UnitWeightCost: u64 = 1;
|
||||
pub KsmPerSecond: (AssetId, u128) = (Concrete(Parent.into()), 1);
|
||||
pub const MaxInstructions: u32 = 100;
|
||||
}
|
||||
@@ -222,12 +222,14 @@ pub mod mock_msg_queue {
|
||||
let (result, event) = match Xcm::<T::Call>::try_from(xcm) {
|
||||
Ok(xcm) => {
|
||||
let location = (1, Parachain(sender.into()));
|
||||
match T::XcmExecutor::execute_xcm(location, xcm, max_weight) {
|
||||
match T::XcmExecutor::execute_xcm(location, xcm, max_weight.ref_time()) {
|
||||
Outcome::Error(e) => (Err(e.clone()), Event::Fail(Some(hash), e)),
|
||||
Outcome::Complete(w) => (Ok(w), Event::Success(Some(hash))),
|
||||
Outcome::Complete(w) =>
|
||||
(Ok(Weight::from_ref_time(w)), Event::Success(Some(hash))),
|
||||
// As far as the caller is concerned, this was dispatched without error, so
|
||||
// we just report the weight used.
|
||||
Outcome::Incomplete(w, e) => (Ok(w), Event::Fail(Some(hash), e)),
|
||||
Outcome::Incomplete(w, e) =>
|
||||
(Ok(Weight::from_ref_time(w)), Event::Fail(Some(hash), e)),
|
||||
}
|
||||
},
|
||||
Err(()) => (Err(XcmError::UnhandledXcmVersion), Event::BadVersion(Some(hash))),
|
||||
@@ -277,7 +279,8 @@ pub mod mock_msg_queue {
|
||||
Self::deposit_event(Event::UnsupportedVersion(id));
|
||||
},
|
||||
Ok(Ok(x)) => {
|
||||
let outcome = T::XcmExecutor::execute_xcm(Parent, x.clone(), limit);
|
||||
let outcome =
|
||||
T::XcmExecutor::execute_xcm(Parent, x.clone(), limit.ref_time());
|
||||
<ReceivedDmp<T>>::append(x);
|
||||
Self::deposit_event(Event::ExecutedDownward(id, outcome));
|
||||
},
|
||||
|
||||
@@ -98,7 +98,7 @@ parameter_types! {
|
||||
pub const KusamaNetwork: NetworkId = NetworkId::Kusama;
|
||||
pub const AnyNetwork: NetworkId = NetworkId::Any;
|
||||
pub Ancestry: MultiLocation = Here.into();
|
||||
pub UnitWeightCost: Weight = 1_000;
|
||||
pub UnitWeightCost: u64 = 1_000;
|
||||
}
|
||||
|
||||
pub type SovereignAccountOf =
|
||||
@@ -115,7 +115,7 @@ type LocalOriginConverter = (
|
||||
);
|
||||
|
||||
parameter_types! {
|
||||
pub const BaseXcmWeight: Weight = 1_000;
|
||||
pub const BaseXcmWeight: u64 = 1_000;
|
||||
pub KsmPerSecond: (AssetId, u128) = (Concrete(KsmLocation::get()), 1);
|
||||
pub const MaxInstructions: u32 = 100;
|
||||
}
|
||||
@@ -162,7 +162,7 @@ impl pallet_xcm::Config for Runtime {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const FirstMessageFactorPercent: u64 = 100;
|
||||
pub const FirstMessageFactorPercent: Weight = Weight::from_ref_time(100);
|
||||
}
|
||||
|
||||
impl ump::Config for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user