diff --git a/substrate/frame/opf/src/functions.rs b/substrate/frame/opf/src/functions.rs index 86dd3240a050..770151645847 100644 --- a/substrate/frame/opf/src/functions.rs +++ b/substrate/frame/opf/src/functions.rs @@ -265,7 +265,7 @@ impl Pallet { // To be executed in a hook, on_initialize pub fn on_idle_function(now: BlockNumberFor, limit: Weight) -> Weight { let mut meter = WeightMeter::with_limit(limit); - let max_block_weight = Weight::from_parts(1000_u64, 0); + let max_block_weight = T::BlockWeights::get().max_block; if meter.try_consume(max_block_weight).is_err() { return meter.consumed();