difftreelog
fix permanently overweight only if no runtime upgrade
in: master
1 file changed
pallets/scheduler-v2/src/lib.rsdiffbeforeafterboth968 });968 });969 Err((Unavailable, Some(task)))969 Err((Unavailable, Some(task)))970 }970 }971 Err(Overweight) if is_first => {971 Err(Overweight) if is_first && !Self::is_runtime_upgraded() => {972 T::Preimages::drop(&task.call);972 T::Preimages::drop(&task.call);973973974 if let Some(ref id) = task.maybe_id {974 if let Some(ref id) = task.maybe_id {1032 }1032 }1033 }1033 }10341035 fn is_runtime_upgraded() -> bool {1036 let last = system::LastRuntimeUpgrade::<T>::get();1037 let current = T::Version::get();10381039 last.map(|v| v.was_upgraded(¤t)).unwrap_or(true)1040 }103410411035 /// Make a dispatch to the given `call` from the given `origin`, ensuring that the `weight`1042 /// Make a dispatch to the given `call` from the given `origin`, ensuring that the `weight`1036 /// counter does not exceed its limit and that it is counted accurately (e.g. accounted using1043 /// counter does not exceed its limit and that it is counted accurately (e.g. accounted using