Skip to content

Commit

Permalink
fix e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospb19-cw committed Nov 29, 2024
1 parent 77f3810 commit 20189b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/eth/storage/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ impl Default for StorageCache {
}

impl StorageCache {
pub fn clear(&self) {
self.slot_cache.lock().clear();
self.account_cache.lock().clear();
}

pub fn cache_slot(&self, address: Address, slot: Slot) {
self.slot_cache.lock().put((address, slot.index), slot.value);
}
Expand Down
2 changes: 2 additions & 0 deletions src/eth/storage/stratus_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,8 @@ impl Storage for StratusStorage {
fn reset_to_genesis(&self) -> Result<(), StratusError> {
use crate::eth::primitives::test_accounts;

self.cache.clear();

tracing::info!("reseting storage to genesis state");

#[cfg(feature = "tracing")]
Expand Down

0 comments on commit 20189b2

Please sign in to comment.