Skip to content

Commit c3b6023

Browse files
authored
chore: add comment for pub function and fix typo (#2015)
1 parent 34bc873 commit c3b6023

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/database/src/states/cache_account.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ impl CacheAccount {
9191
)
9292
}
9393

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

101-
/// Fetches account info if it exist.
101+
/// Fetches account info if it exists.
102102
pub fn account_info(&self) -> Option<AccountInfo> {
103103
self.account.as_ref().map(|a| a.info.clone())
104104
}
@@ -276,6 +276,9 @@ impl CacheAccount {
276276
})
277277
}
278278

279+
// Updates the account with new information and storage changes.
280+
//
281+
// Merges the provided storage values with the existing storage and updates the account status.
279282
pub fn change(
280283
&mut self,
281284
new: AccountInfo,

0 commit comments

Comments
 (0)