diff --git a/polkadot/runtime/parachains/src/configuration.rs b/polkadot/runtime/parachains/src/configuration.rs index 8c63fb620418b..b9d2ce5b98ef3 100644 --- a/polkadot/runtime/parachains/src/configuration.rs +++ b/polkadot/runtime/parachains/src/configuration.rs @@ -1347,13 +1347,16 @@ impl Pallet { /// will check if the previous configuration was valid. If it was invalid, we proceed with /// updating the configuration, giving a chance to recover from such a condition. /// - /// The actual configuration change take place after a couple of sessions have passed. In case - /// this function is called more than once in a session, then the pending configuration change - /// will be updated and the changes will be applied at once. - // NOTE: Explicitly tell rustc not to inline this because otherwise heuristics note the incoming - // closure making it's attractive to inline. However, in this case, we will end up with lots of - // duplicated code (making this function to show up in the top of heaviest functions) only for - // the sake of essentially avoiding an indirect call. Doesn't worth it. + /// The actual configuration change takes place after a couple of sessions have passed. In case + /// this function is called more than once in the same session, then the pending configuration + /// change will be updated. + /// In other words, all the configuration changes made in the same session will be folded + /// together in the order they were made, and only once the scheduled session is reached will + /// the final pending configuration be applied. + // NOTE: Explicitly tell rustc not to inline this, because otherwise heuristics note the + // incoming closure make it attractive to inline. However, in that case, we will end up with + // lots of duplicated code (making this function show up on top of the heaviest functions) only + // for the sake of essentially avoiding an indirect call. It is not worth it. #[inline(never)] pub(crate) fn schedule_config_update( updater: impl FnOnce(&mut HostConfiguration>),