reth_provider

Trait StorageTrieWriter

pub trait StorageTrieWriter: Send + Sync {
    // Required methods
    fn write_storage_trie_updates(
        &self,
        storage_tries: &HashMap<FixedBytes<32>, StorageTrieUpdates, FbBuildHasher<32>>,
    ) -> Result<usize, ProviderError>;
    fn write_individual_storage_trie_updates(
        &self,
        hashed_address: FixedBytes<32>,
        updates: &StorageTrieUpdates,
    ) -> Result<usize, ProviderError>;
}
Expand description

Storage Trie Writer

Required Methods§

fn write_storage_trie_updates( &self, storage_tries: &HashMap<FixedBytes<32>, StorageTrieUpdates, FbBuildHasher<32>>, ) -> Result<usize, ProviderError>

Writes storage trie updates from the given storage trie map.

First sorts the storage trie updates by the hashed address key, writing in sorted order.

Returns the number of entries modified.

fn write_individual_storage_trie_updates( &self, hashed_address: FixedBytes<32>, updates: &StorageTrieUpdates, ) -> Result<usize, ProviderError>

Writes storage trie updates for the given hashed address.

Implementations on Foreign Types§

§

impl<'a, T> StorageTrieWriter for &'a T
where T: 'a + StorageTrieWriter + ?Sized, &'a T: Send + Sync,

§

fn write_storage_trie_updates( &self, storage_tries: &HashMap<FixedBytes<32>, StorageTrieUpdates, FbBuildHasher<32>>, ) -> Result<usize, ProviderError>

§

fn write_individual_storage_trie_updates( &self, hashed_address: FixedBytes<32>, updates: &StorageTrieUpdates, ) -> Result<usize, ProviderError>

§

impl<T> StorageTrieWriter for Box<T>
where T: StorageTrieWriter + ?Sized, Box<T>: Send + Sync,

§

fn write_storage_trie_updates( &self, storage_tries: &HashMap<FixedBytes<32>, StorageTrieUpdates, FbBuildHasher<32>>, ) -> Result<usize, ProviderError>

§

fn write_individual_storage_trie_updates( &self, hashed_address: FixedBytes<32>, updates: &StorageTrieUpdates, ) -> Result<usize, ProviderError>

§

impl<T> StorageTrieWriter for Arc<T>
where T: StorageTrieWriter + ?Sized, Arc<T>: Send + Sync,

§

fn write_storage_trie_updates( &self, storage_tries: &HashMap<FixedBytes<32>, StorageTrieUpdates, FbBuildHasher<32>>, ) -> Result<usize, ProviderError>

§

fn write_individual_storage_trie_updates( &self, hashed_address: FixedBytes<32>, updates: &StorageTrieUpdates, ) -> Result<usize, ProviderError>

Implementors§

Source§

impl<TX: DbTxMut + DbTx + 'static, N: NodeTypes> StorageTrieWriter for DatabaseProvider<TX, N>