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

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
KiChjang committed Sep 6, 2022
1 parent b2ff4c0 commit 4efc62c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions xcm/pallet-xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ pub mod pallet {
SupportedVersion::<T>::insert(XCM_VERSION, new_key, value);
}
weight_used.saturating_accrue(todo_sv_migrate_weight);
if weight_used >= weight_cutoff {
if weight_used.any_gte(weight_cutoff) {
return (weight_used, Some(stage))
}
}
Expand All @@ -922,7 +922,7 @@ pub mod pallet {
VersionNotifiers::<T>::insert(XCM_VERSION, new_key, value);
}
weight_used.saturating_accrue(todo_vn_migrate_weight);
if weight_used >= weight_cutoff {
if weight_used.any_gte(weight_cutoff) {
return (weight_used, Some(stage))
}
}
Expand Down Expand Up @@ -963,7 +963,7 @@ pub mod pallet {
};
Self::deposit_event(event);
weight_used.saturating_accrue(todo_vnt_notify_weight);
if weight_used >= weight_cutoff {
if weight_used.any_gte(weight_cutoff) {
let last = Some(iter.last_raw_key().into());
return (weight_used, Some(NotifyCurrentTargets(last)))
}
Expand All @@ -981,7 +981,7 @@ pub mod pallet {
old_key, value.0,
));
weight_used.saturating_accrue(todo_vnt_migrate_fail_weight);
if weight_used >= weight_cutoff {
if weight_used.any_gte(weight_cutoff) {
return (weight_used, Some(stage))
}
continue
Expand Down Expand Up @@ -1011,7 +1011,7 @@ pub mod pallet {
Self::deposit_event(event);
weight_used.saturating_accrue(todo_vnt_notify_migrate_weight);
}
if weight_used >= weight_cutoff {
if weight_used.any_gte(weight_cutoff) {
return (weight_used, Some(stage))
}
}
Expand Down Expand Up @@ -1405,7 +1405,7 @@ pub mod pallet {
Queries::<T>::remove(query_id);
let weight = call.get_dispatch_info().weight;
let max_weight = Weight::from_ref_time(max_weight);
if weight > max_weight {
if weight.any_gt(max_weight) {
let e = Event::NotifyOverweight(
query_id,
pallet_index,
Expand Down

0 comments on commit 4efc62c

Please sign in to comment.