[][src]Struct beacon_chain::eth1_chain::CachingEth1Backend

pub struct CachingEth1Backend<T: EthSpec, S> {
    pub core: HttpService,
    // some fields omitted
}

Maintains a cache of eth1 blocks and deposits and provides functions to allow block producers to include new deposits and vote on Eth1Data.

The core connects to some external eth1 client (e.g., Parity/Geth) and polls it for information.

Fields

core: HttpService

Methods

impl<T: EthSpec, S: Store> CachingEth1Backend<T, S>[src]

pub fn new(config: Eth1Config, log: Logger, store: Arc<S>) -> Self[src]

Instantiates self with empty caches.

Does not connect to the eth1 node or start any tasks to keep the cache updated.

pub fn start(&self, exit: Exit) -> impl Future<Item = (), Error = ()>[src]

Starts the routine which connects to the external eth1 node and updates the caches.

pub fn from_service(service: HttpService, store: Arc<S>) -> Self[src]

Instantiates self from an existing service.

Trait Implementations

impl<T: EthSpec, S: Store> Eth1ChainBackend<T> for CachingEth1Backend<T, S>[src]

impl<T: Clone + EthSpec, S: Clone> Clone for CachingEth1Backend<T, S>[src]

Auto Trait Implementations

impl<T, S> Send for CachingEth1Backend<T, S> where
    S: Send + Sync

impl<T, S> Unpin for CachingEth1Backend<T, S> where
    T: Unpin

impl<T, S> Sync for CachingEth1Backend<T, S> where
    S: Send + Sync

impl<T, S> !UnwindSafe for CachingEth1Backend<T, S>

impl<T, S> !RefUnwindSafe for CachingEth1Backend<T, S>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<T> Erased for T