@@ -31,10 +31,11 @@ where
3131 self . inner . set_block ( block) ;
3232 }
3333
34- fn transact_one ( & mut self , tx : Self :: Tx ) -> Result < Self :: ExecutionResult , Self :: Error > {
35- let mut tx = tx;
34+ fn transact_one ( & mut self , mut tx : Self :: Tx ) -> Result < Self :: ExecutionResult , Self :: Error > {
3635 self . prepare_tx_for_execution ( & mut tx) ;
37- self . maybe_bump_beneficiary_balance_for_trace ( tx. is_system_transaction , tx. base . value ) ;
36+ if tx. is_system_transaction {
37+ self . fund_beneficiary_for_system_tx_replay ( tx. base . value ) ;
38+ }
3839 self . inner . ctx . set_tx ( tx) ;
3940 BscHandler :: new ( ) . run ( self )
4041 }
4546
4647 fn replay ( & mut self ) -> Result < ResultAndState , Self :: Error > {
4748 self . prepare_current_tx_for_execution ( ) ;
48- let is_sys = self . inner . ctx . tx . is_system_transaction ;
49- let value = self . inner . ctx . tx . base . value ;
50- self . maybe_bump_beneficiary_balance_for_trace ( is_sys, value) ;
49+ if self . inner . ctx . tx . is_system_transaction {
50+ let value = self . inner . ctx . tx . base . value ;
51+ self . fund_beneficiary_for_system_tx_replay ( value) ;
52+ }
5153 BscHandler :: new ( ) . run ( self ) . map ( |result| {
5254 let state = self . finalize ( ) ;
5355 ResultAndState :: new ( result, state)
@@ -75,10 +77,11 @@ where
7577 self . inner . set_inspector ( inspector) ;
7678 }
7779
78- fn inspect_one_tx ( & mut self , tx : Self :: Tx ) -> Result < Self :: ExecutionResult , Self :: Error > {
79- let mut tx = tx;
80+ fn inspect_one_tx ( & mut self , mut tx : Self :: Tx ) -> Result < Self :: ExecutionResult , Self :: Error > {
8081 self . prepare_tx_for_execution ( & mut tx) ;
81- self . maybe_bump_beneficiary_balance_for_trace ( tx. is_system_transaction , tx. base . value ) ;
82+ if tx. is_system_transaction {
83+ self . fund_beneficiary_for_system_tx_replay ( tx. base . value ) ;
84+ }
8285 self . inner . ctx . set_tx ( tx) ;
8386 BscHandler :: new ( ) . inspect_run ( self )
8487 }
0 commit comments