diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index bac1ee28a7ca..5afab5d49493 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -526,8 +526,11 @@ pub mod pallet { /// As a side effect, this function upgrades the current validation function /// if the appropriate time has come. #[pallet::call_index(0)] - #[pallet::weight((0, DispatchClass::Mandatory))] - // TODO: This weight should be corrected. + #[pallet::weight((::BlockWeights::get().max_block, DispatchClass::Mandatory))] + // It makes no sense to have a weight hint for mandatory inherents, because like hooks they must be + // executed regardless of the weight they consume. We just need to be sure that: + // - The returned `actual_weight` field is always Some. + // - The weight hint is always greather than the returned `actual_weight`. pub fn set_validation_data( origin: OriginFor, data: ParachainInherentData,