Skip to content

Commit

Permalink
get_accessed_addresses -> accessed_addresses
Browse files Browse the repository at this point in the history
Co-authored-by: Wei Tang <accounts@that.world>
  • Loading branch information
joshuajbouw and sorpaas committed Jul 30, 2021
1 parent 9bee750 commit 7da1cbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gasometer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ impl<'config> Gasometer<'config> {
}
}

pub fn get_accessed_addresses(&self) -> Option<alloc::collections::btree_set::Iter<'_, H160>> {
pub fn accessed_addresses(&self) -> Option<alloc::collections::btree_set::Iter<'_, H160>> {
self.inner
.as_ref()
.ok()
.and_then(|inner| inner.accessed_addresses.as_ref())
.map(|set| set.iter())
}

pub fn get_accessed_storages(
pub fn accessed_storages(
&self,
) -> Option<alloc::collections::btree_set::Iter<'_, (H160, H256)>> {
self.inner
Expand Down
2 changes: 1 addition & 1 deletion src/executor/stack/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl<'config> StackSubstateMetadata<'config> {
if let Some(addresses) = other.gasometer.get_accessed_addresses() {
self.gasometer.access_addresses(addresses.copied())?;
}
if let Some(storages) = other.gasometer.get_accessed_storages() {
if let Some(storages) = other.gasometer.accessed_storages() {
self.gasometer.access_storages(storages.copied())?;
}

Expand Down

0 comments on commit 7da1cbd

Please sign in to comment.