Skip to content

Commit

Permalink
chore: add comment for pub function and fix typo (#2015)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwener authored Jan 24, 2025
1 parent 34bc873 commit c3b6023
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/database/src/states/cache_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ impl CacheAccount {
)
}

/// Returns storage slot if it exist.
/// Returns storage slot if it exists.
pub fn storage_slot(&self, slot: U256) -> Option<U256> {
self.account
.as_ref()
.and_then(|a| a.storage.get(&slot).cloned())
}

/// Fetches account info if it exist.
/// Fetches account info if it exists.
pub fn account_info(&self) -> Option<AccountInfo> {
self.account.as_ref().map(|a| a.info.clone())
}
Expand Down Expand Up @@ -276,6 +276,9 @@ impl CacheAccount {
})
}

// Updates the account with new information and storage changes.
//
// Merges the provided storage values with the existing storage and updates the account status.
pub fn change(
&mut self,
new: AccountInfo,
Expand Down

0 comments on commit c3b6023

Please sign in to comment.