From 26886b9a1248dfe456ddc3620d5212aa40d3e29b Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Thu, 27 Jun 2024 16:36:07 +0200 Subject: [PATCH] chore: rename `TrieCursorFactory::storage_tries_cursor` to `TrieCursorFactory::storage_trie_cursor` --- crates/trie/trie/src/trie.rs | 2 +- crates/trie/trie/src/trie_cursor/database_cursors.rs | 2 +- crates/trie/trie/src/trie_cursor/mod.rs | 2 +- crates/trie/trie/src/trie_cursor/noop.rs | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/trie/trie/src/trie.rs b/crates/trie/trie/src/trie.rs index 25ae616584d7..e56946747169 100644 --- a/crates/trie/trie/src/trie.rs +++ b/crates/trie/trie/src/trie.rs @@ -491,7 +491,7 @@ where } let mut tracker = TrieTracker::default(); - let trie_cursor = self.trie_cursor_factory.storage_tries_cursor(self.hashed_address)?; + let trie_cursor = self.trie_cursor_factory.storage_trie_cursor(self.hashed_address)?; let walker = TrieWalker::new(trie_cursor, self.prefix_set).with_updates(retain_updates); let mut hash_builder = HashBuilder::default().with_updates(retain_updates); diff --git a/crates/trie/trie/src/trie_cursor/database_cursors.rs b/crates/trie/trie/src/trie_cursor/database_cursors.rs index 910ae61b4648..84cc69ce1925 100644 --- a/crates/trie/trie/src/trie_cursor/database_cursors.rs +++ b/crates/trie/trie/src/trie_cursor/database_cursors.rs @@ -13,7 +13,7 @@ impl<'a, TX: DbTx> TrieCursorFactory for &'a TX { Ok(Box::new(DatabaseAccountTrieCursor::new(self.cursor_read::()?))) } - fn storage_tries_cursor( + fn storage_trie_cursor( &self, hashed_address: B256, ) -> Result, DatabaseError> { diff --git a/crates/trie/trie/src/trie_cursor/mod.rs b/crates/trie/trie/src/trie_cursor/mod.rs index aae7e773c690..e083be76411a 100644 --- a/crates/trie/trie/src/trie_cursor/mod.rs +++ b/crates/trie/trie/src/trie_cursor/mod.rs @@ -18,7 +18,7 @@ pub trait TrieCursorFactory { fn account_trie_cursor(&self) -> Result, DatabaseError>; /// Create a storage tries cursor. - fn storage_tries_cursor( + fn storage_trie_cursor( &self, hashed_address: B256, ) -> Result, DatabaseError>; diff --git a/crates/trie/trie/src/trie_cursor/noop.rs b/crates/trie/trie/src/trie_cursor/noop.rs index 46163180b8b9..98c19216e655 100644 --- a/crates/trie/trie/src/trie_cursor/noop.rs +++ b/crates/trie/trie/src/trie_cursor/noop.rs @@ -1,6 +1,7 @@ use super::{TrieCursor, TrieCursorFactory}; use crate::{updates::TrieKey, BranchNodeCompact, Nibbles}; use reth_db::DatabaseError; +use reth_primitives::B256; /// Noop trie cursor factory. #[derive(Default, Debug)] @@ -14,9 +15,9 @@ impl TrieCursorFactory for NoopTrieCursorFactory { } /// Generates a Noop storage trie cursor. - fn storage_tries_cursor( + fn storage_trie_cursor( &self, - _hashed_address: reth_primitives::B256, + _hashed_address: B256, ) -> Result, DatabaseError> { Ok(Box::::default()) }