[][src]Struct beacon_chain::eth1_chain::Eth1Chain

pub struct Eth1Chain<T, E> where
    T: Eth1ChainBackend<E>,
    E: EthSpec
{ pub use_dummy_backend: bool, // some fields omitted }

Holds an Eth1ChainBackend and serves requests from the BeaconChain.

Fields

use_dummy_backend: bool

When true, the backend will be ignored and dummy data from the 2019 Canada interop method will be used instead.

Methods

impl<T, E> Eth1Chain<T, E> where
    T: Eth1ChainBackend<E>,
    E: EthSpec
[src]

pub fn new(backend: T) -> Self[src]

pub fn eth1_data_for_block_production(
    &self,
    state: &BeaconState<E>,
    spec: &ChainSpec
) -> Result<Eth1Data, Error>
[src]

Returns the Eth1Data that should be included in a block being produced for the given state.

pub fn deposits_for_block_inclusion(
    &self,
    state: &BeaconState<E>,
    spec: &ChainSpec
) -> Result<Vec<Deposit>, Error>
[src]

Returns a list of Deposits that may be included in a block.

Including all of the returned Deposits in a block should not cause it to become invalid.

Auto Trait Implementations

impl<T, E> Send for Eth1Chain<T, E>

impl<T, E> Unpin for Eth1Chain<T, E> where
    E: Unpin,
    T: Unpin

impl<T, E> Sync for Eth1Chain<T, E>

impl<T, E> UnwindSafe for Eth1Chain<T, E> where
    E: UnwindSafe,
    T: UnwindSafe

impl<T, E> RefUnwindSafe for Eth1Chain<T, E> where
    E: RefUnwindSafe,
    T: RefUnwindSafe

Blanket Implementations

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<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

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