This repository was archived by the owner on Nov 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,13 +164,13 @@ impl OnRuntimeUpgrade for Tuple {
164164 /// that occur.
165165 #[ cfg( feature = "try-runtime" ) ]
166166 fn try_on_runtime_upgrade ( checks : bool ) -> Result < Weight , TryRuntimeError > {
167- let mut weight = Weight :: zero ( ) ;
167+ let mut cumulative_weight = Weight :: zero ( ) ;
168168
169169 let mut errors = Vec :: new ( ) ;
170170
171171 for_tuples ! ( #(
172172 match Tuple :: try_on_runtime_upgrade( checks) {
173- Ok ( weight) => { weight . saturating_add ( weight) ; } ,
173+ Ok ( weight) => { cumulative_weight . saturating_accrue ( weight) ; } ,
174174 Err ( err) => { errors. push( err) ; } ,
175175 }
176176 ) * ) ;
@@ -194,7 +194,7 @@ impl OnRuntimeUpgrade for Tuple {
194194 return Err ( "Detected multiple errors while executing `try_on_runtime_upgrade`, check the logs!" . into ( ) )
195195 }
196196
197- Ok ( weight )
197+ Ok ( cumulative_weight )
198198 }
199199
200200 /// [`OnRuntimeUpgrade::pre_upgrade`] should not be used on a tuple.
You can’t perform that action at this time.
0 commit comments