reth_provider

Trait StorageTrieWriter

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

Storage Trie Writer

Required Methods§

Source

fn write_storage_trie_updates( &self, storage_tries: &HashMap<B256, StorageTrieUpdates>, ) -> ProviderResult<usize>

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.

Source

fn write_individual_storage_trie_updates( &self, hashed_address: B256, updates: &StorageTrieUpdates, ) -> ProviderResult<usize>

Writes storage trie updates for the given hashed address.

Implementations on Foreign Types§

Source§

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

Source§

fn write_storage_trie_updates( &self, storage_tries: &HashMap<B256, StorageTrieUpdates>, ) -> ProviderResult<usize>

Source§

fn write_individual_storage_trie_updates( &self, hashed_address: B256, updates: &StorageTrieUpdates, ) -> ProviderResult<usize>

Source§

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

Source§

fn write_storage_trie_updates( &self, storage_tries: &HashMap<B256, StorageTrieUpdates>, ) -> ProviderResult<usize>

Source§

fn write_individual_storage_trie_updates( &self, hashed_address: B256, updates: &StorageTrieUpdates, ) -> ProviderResult<usize>

Source§

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

Source§

fn write_storage_trie_updates( &self, storage_tries: &HashMap<B256, StorageTrieUpdates>, ) -> ProviderResult<usize>

Source§

fn write_individual_storage_trie_updates( &self, hashed_address: B256, updates: &StorageTrieUpdates, ) -> ProviderResult<usize>

Implementors§

Source§

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