pub(crate) async fn beacon_get_entry<'a, DB, KS, B>(
    data: Data<RpcState<DB, KS, B>>,
    Params(params): Params<Vec<ChainEpoch>>,
) -> Result<BeaconEntryJson, JsonRpcError>
where
    DB: BlockStore + Send + Sync + 'static,
    KS: KeyStore + Send + Sync + 'static,
    B: Beacon + Send + Sync + 'static,
{
    let first = params
        .first()
        .ok_or_else(|| "Empty vec given for beacon".to_string())?;
    let (_, beacon) = data.beacon.beacon_for_epoch(*first)?;
    let rr = beacon.max_beacon_round_for_epoch(*first);
    let e = beacon.entry(rr).await?;
    Ok(BeaconEntryJson(e))
}
/// BeaconGetEntry returns the beacon entry for the given filecoin epoch. If
/// the entry has not yet been produced, the call will block until the entry
/// becomes available
BeaconGetEntry returns the beacon entry for the given filecoin epoch. If
the entry has not yet been produced, the call will block until the entry
becomes available
BeaconGetEntry returns the beacon entry for the given filecoin epoch . If the entry has not yet been produced the call will block until the entry becomes available
pub(crate) async fn beacon_get_entry<'a, DB, KS, B>(
    data: Data<RpcState<DB, KS, B>>,
    Params(params): Params<Vec<ChainEpoch>>,
) -> Result<BeaconEntryJson, JsonRpcError>
where
    DB: BlockStore + Send + Sync + 'static,
    KS: KeyStore + Send + Sync + 'static,
    B: Beacon + Send + Sync + 'static,
{
    let first = params
        .first()
        .ok_or_else(|| "Empty vec given for beacon".to_string())?;
    let (_, beacon) = data.beacon.beacon_for_epoch(*first)?;
    let rr = beacon.max_beacon_round_for_epoch(*first);
    let e = beacon.entry(rr).await?;
    Ok(BeaconEntryJson(e))
}
pub ( crate ) async fn beacon_get_entry < ' a , DB , KS , B > ( data : Data < RpcState < DB , KS , B > > , Params ( params ) : Params < Vec < ChainEpoch > > , ) -> Result < BeaconEntryJson , JsonRpcError > where DB : BlockStore + Send + Sync + ' static , KS : KeyStore + Send + Sync + ' static , B : Beacon + Send + Sync + ' static , { let first = params . first ( ) . ok_or_else ( | | " " . to_string ( ) ) ? ; let ( _ , beacon ) = data . beacon . beacon_for_epoch ( * first ) ? ; let rr = beacon . max_beacon_round_for_epoch ( * first ) ; let e = beacon . entry ( rr ) . await ? ; Ok ( BeaconEntryJson ( e ) ) }
BeaconGetEntry returns the beacon entry for the given filecoin epoch.
BeaconGetEntry returns the beacon entry for the given filecoin epoch .
data
Params<Vec<ChainEpoch>>