From 2cf44db18033d9faf60a5704dfe1c4536759d1bf Mon Sep 17 00:00:00 2001 From: ndkazu Date: Fri, 20 Sep 2024 23:21:54 +0900 Subject: [PATCH] changed max_weight in opf --- substrate/frame/opf/src/functions.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();