From 6f689497d0102f4001aa1dea903d637921b784e8 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Sat, 12 Feb 2022 18:09:47 +0200 Subject: [PATCH 1/2] feat(evm): expose account_mut on substate --- src/executor/stack/memory.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/executor/stack/memory.rs b/src/executor/stack/memory.rs index 0ec07eabf..56c71c5a6 100644 --- a/src/executor/stack/memory.rs +++ b/src/executor/stack/memory.rs @@ -279,7 +279,7 @@ impl<'config> MemoryStackSubstate<'config> { } #[allow(clippy::map_entry)] - fn account_mut(&mut self, address: H160, backend: &B) -> &mut MemoryStackAccount { + pub fn account_mut(&mut self, address: H160, backend: &B) -> &mut MemoryStackAccount { if !self.accounts.contains_key(&address) { let account = self .known_account(address) From 8e7ee4ec50e375cc00b58267b72491c7e2e14fb6 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Sat, 12 Feb 2022 18:11:33 +0200 Subject: [PATCH 2/2] chore: fmt --- src/executor/stack/memory.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/executor/stack/memory.rs b/src/executor/stack/memory.rs index 56c71c5a6..0c01bcdb1 100644 --- a/src/executor/stack/memory.rs +++ b/src/executor/stack/memory.rs @@ -279,7 +279,11 @@ impl<'config> MemoryStackSubstate<'config> { } #[allow(clippy::map_entry)] - pub fn account_mut(&mut self, address: H160, backend: &B) -> &mut MemoryStackAccount { + pub fn account_mut( + &mut self, + address: H160, + backend: &B, + ) -> &mut MemoryStackAccount { if !self.accounts.contains_key(&address) { let account = self .known_account(address)