mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
chore: rename TrieCursorFactory::storage_tries_cursor to TrieCursorFactory::storage_trie_cursor (#9145)
This commit is contained in:
@ -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);
|
||||
|
||||
@ -13,7 +13,7 @@ impl<'a, TX: DbTx> TrieCursorFactory for &'a TX {
|
||||
Ok(Box::new(DatabaseAccountTrieCursor::new(self.cursor_read::<tables::AccountsTrie>()?)))
|
||||
}
|
||||
|
||||
fn storage_tries_cursor(
|
||||
fn storage_trie_cursor(
|
||||
&self,
|
||||
hashed_address: B256,
|
||||
) -> Result<Box<dyn TrieCursor + '_>, DatabaseError> {
|
||||
|
||||
@ -18,7 +18,7 @@ pub trait TrieCursorFactory {
|
||||
fn account_trie_cursor(&self) -> Result<Box<dyn TrieCursor + '_>, DatabaseError>;
|
||||
|
||||
/// Create a storage tries cursor.
|
||||
fn storage_tries_cursor(
|
||||
fn storage_trie_cursor(
|
||||
&self,
|
||||
hashed_address: B256,
|
||||
) -> Result<Box<dyn TrieCursor + '_>, DatabaseError>;
|
||||
|
||||
@ -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<Box<dyn TrieCursor + '_>, DatabaseError> {
|
||||
Ok(Box::<NoopStorageTrieCursor>::default())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user