@@ -182,21 +182,21 @@ where
182182 where
183183 K : Kernel < CallManager = Self > ,
184184 {
185- if self . machine . context ( ) . tracing {
186- if let Entrypoint :: Invoke ( method) = & entrypoint {
187- self . trace ( ExecutionEvent :: Call {
188- from ,
189- to ,
190- method : * method ,
191- params : params . as_ref ( ) . map ( Into :: into ) ,
192- value : value . clone ( ) ,
193- gas_limit : std :: cmp :: min (
194- gas_limit. unwrap_or ( Gas :: from_milligas ( u64 :: MAX ) ) . round_up ( ) ,
195- self . gas_tracker . gas_available ( ) . round_up ( ) ,
196- ) ,
197- read_only ,
198- } ) ;
199- }
185+ if self . machine . context ( ) . tracing
186+ && let Entrypoint :: Invoke ( method) = & entrypoint
187+ {
188+ self . trace ( ExecutionEvent :: Call {
189+ from ,
190+ to ,
191+ method : * method ,
192+ params : params . as_ref ( ) . map ( Into :: into ) ,
193+ value : value . clone ( ) ,
194+ gas_limit : std :: cmp :: min (
195+ gas_limit . unwrap_or ( Gas :: from_milligas ( u64 :: MAX ) ) . round_up ( ) ,
196+ self . gas_tracker . gas_available ( ) . round_up ( ) ,
197+ ) ,
198+ read_only ,
199+ } ) ;
200200 }
201201
202202 // If a specific gas limit has been requested, push a new limit into the gas tracker.
@@ -897,14 +897,13 @@ where
897897 . ok ( )
898898 . and_then ( |r| r. value . as_ref ( ) )
899899 . map ( |v| ( v. size ( ) , v. links ( ) . len ( ) ) )
900- {
901- if let Err ( e) = cm. charge_gas ( cm. price_list ( ) . on_method_return (
900+ && let Err ( e) = cm. charge_gas ( cm. price_list ( ) . on_method_return (
902901 cm. call_stack_depth ,
903902 ret_size,
904903 link_count,
905- ) ) {
906- ret = Err ( e ) ;
907- }
904+ ) )
905+ {
906+ ret = Err ( e ) ;
908907 }
909908
910909 // Log the results if tracing is enabled.
0 commit comments