reth_provider

Trait AccountExtReader

pub trait AccountExtReader: Send + Sync {
    // Required methods
    fn changed_accounts_with_range(
        &self,
        _range: impl RangeBounds<u64>,
    ) -> Result<BTreeSet<Address>, ProviderError>;
    fn basic_accounts(
        &self,
        _iter: impl IntoIterator<Item = Address>,
    ) -> Result<Vec<(Address, Option<Account>)>, ProviderError>;
    fn changed_accounts_and_blocks_with_range(
        &self,
        range: RangeInclusive<u64>,
    ) -> Result<BTreeMap<Address, Vec<u64>>, ProviderError>;
}
Expand description

Account reader

Required Methods§

fn changed_accounts_with_range( &self, _range: impl RangeBounds<u64>, ) -> Result<BTreeSet<Address>, ProviderError>

Iterate over account changesets and return all account address that were changed.

fn basic_accounts( &self, _iter: impl IntoIterator<Item = Address>, ) -> Result<Vec<(Address, Option<Account>)>, ProviderError>

Get basic account information for multiple accounts. A more efficient version than calling AccountReader::basic_account repeatedly.

Returns None if the account doesn’t exist.

fn changed_accounts_and_blocks_with_range( &self, range: RangeInclusive<u64>, ) -> Result<BTreeMap<Address, Vec<u64>>, ProviderError>

Iterate over account changesets and return all account addresses that were changed alongside each specific set of blocks.

NOTE: Get inclusive range of blocks.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

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

§

fn changed_accounts_with_range( &self, _range: impl RangeBounds<u64>, ) -> Result<BTreeSet<Address>, ProviderError>

§

fn basic_accounts( &self, _iter: impl IntoIterator<Item = Address>, ) -> Result<Vec<(Address, Option<Account>)>, ProviderError>

§

fn changed_accounts_and_blocks_with_range( &self, range: RangeInclusive<u64>, ) -> Result<BTreeMap<Address, Vec<u64>>, ProviderError>

§

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

§

fn changed_accounts_with_range( &self, _range: impl RangeBounds<u64>, ) -> Result<BTreeSet<Address>, ProviderError>

§

fn basic_accounts( &self, _iter: impl IntoIterator<Item = Address>, ) -> Result<Vec<(Address, Option<Account>)>, ProviderError>

§

fn changed_accounts_and_blocks_with_range( &self, range: RangeInclusive<u64>, ) -> Result<BTreeMap<Address, Vec<u64>>, ProviderError>

§

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

§

fn changed_accounts_with_range( &self, _range: impl RangeBounds<u64>, ) -> Result<BTreeSet<Address>, ProviderError>

§

fn basic_accounts( &self, _iter: impl IntoIterator<Item = Address>, ) -> Result<Vec<(Address, Option<Account>)>, ProviderError>

§

fn changed_accounts_and_blocks_with_range( &self, range: RangeInclusive<u64>, ) -> Result<BTreeMap<Address, Vec<u64>>, ProviderError>

Implementors§

Source§

impl<TX: DbTx, N: NodeTypes> AccountExtReader for DatabaseProvider<TX, N>