From e97e3b8c078ef76e18d8d1560663dc4c74c9a69f Mon Sep 17 00:00:00 2001 From: maximopalopoli Date: Fri, 29 Nov 2024 11:31:08 -0300 Subject: [PATCH] Fix balance decrease --- crates/vm/levm/src/vm.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/vm/levm/src/vm.rs b/crates/vm/levm/src/vm.rs index 1eca17cb9..c0c60d64d 100644 --- a/crates/vm/levm/src/vm.rs +++ b/crates/vm/levm/src/vm.rs @@ -655,14 +655,14 @@ impl VM { ret_size: usize, ) -> Result { let (sender_account_info, _address_was_cold) = - self.access_account(current_call_frame.msg_sender); + self.access_account(msg_sender); if sender_account_info.balance < value { current_call_frame.stack.push(U256::from(REVERT_FOR_CALL))?; return Ok(OpcodeSuccess::Continue); } - self.decrease_account_balance(current_call_frame.msg_sender, value)?; + self.decrease_account_balance(msg_sender, value)?; self.increase_account_balance(to, value)?; let (code_account_info, _address_was_cold) = self.access_account(code_address);