mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
Migrate to Weight::from_parts (#2245)
* Migrate to from_parts Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix remaining files Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * cargo update -p polkadot-primitives Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * cargo update -p sp-io Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use Master Cargo.lock Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * cargo update -p polkadot-primitives Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * cargo update -p sp-io Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
cf3ddb831c
commit
70a0864e4c
@@ -142,7 +142,7 @@ pub mod pallet {
|
||||
/// Events:
|
||||
/// - `OverweightServiced`: On success.
|
||||
#[pallet::call_index(0)]
|
||||
#[pallet::weight((weight_limit.saturating_add(Weight::from_ref_time(1_000_000)), DispatchClass::Operational))]
|
||||
#[pallet::weight((weight_limit.saturating_add(Weight::from_parts(1_000_000, 0)), DispatchClass::Operational))]
|
||||
pub fn service_overweight(
|
||||
origin: OriginFor<T>,
|
||||
index: OverweightIndex,
|
||||
@@ -161,7 +161,7 @@ pub mod pallet {
|
||||
.map_err(|_| Error::<T>::WeightOverLimit)?;
|
||||
Overweight::<T>::remove(index);
|
||||
Self::deposit_event(Event::OverweightServiced { index, used });
|
||||
Ok(Some(used.saturating_add(Weight::from_ref_time(1_000_000))).into())
|
||||
Ok(Some(used.saturating_add(Weight::from_parts(1_000_000, 0))).into())
|
||||
}
|
||||
|
||||
/// Suspends all XCM executions for the XCMP queue, regardless of the sender's origin.
|
||||
@@ -467,8 +467,8 @@ impl Default for QueueConfigData {
|
||||
suspend_threshold: 2,
|
||||
drop_threshold: 5,
|
||||
resume_threshold: 1,
|
||||
threshold_weight: Weight::from_ref_time(100_000),
|
||||
weight_restrict_decay: Weight::from_ref_time(2),
|
||||
threshold_weight: Weight::from_parts(100_000, 0),
|
||||
weight_restrict_decay: Weight::from_parts(2, 0),
|
||||
xcmp_max_individual_weight: Weight::from_parts(
|
||||
20u64 * WEIGHT_REF_TIME_PER_MILLIS,
|
||||
DEFAULT_POV_SIZE,
|
||||
|
||||
Reference in New Issue
Block a user