[][src]Trait beacon_chain::eth1_chain::Eth1ChainBackend

pub trait Eth1ChainBackend<T: EthSpec>: Sized + Send + Sync {
    fn eth1_data(
        &self,
        beacon_state: &BeaconState<T>,
        spec: &ChainSpec
    ) -> Result<Eth1Data, Error>;
fn queued_deposits(
        &self,
        beacon_state: &BeaconState<T>,
        spec: &ChainSpec
    ) -> Result<Vec<Deposit>, Error>; }

Required methods

fn eth1_data(
    &self,
    beacon_state: &BeaconState<T>,
    spec: &ChainSpec
) -> Result<Eth1Data, Error>

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

fn queued_deposits(
    &self,
    beacon_state: &BeaconState<T>,
    spec: &ChainSpec
) -> Result<Vec<Deposit>, Error>

Returns all Deposits between state.eth1_deposit_index and state.eth1_data.deposit_count.

Note:

It is possible that not all returned Deposits can be included in a block. E.g., there may be more than MAX_DEPOSIT_COUNT or the churn may be too high.

Loading content...

Implementors

impl<T: EthSpec> Eth1ChainBackend<T> for DummyEth1ChainBackend<T>[src]

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

Loading content...