add traits
This commit is contained in:
parent
c2237668ea
commit
7d7ac4b5aa
|
@ -9,7 +9,7 @@ use crate::types::{BeaconBlock, Bootstrap, FinalityUpdate, OptimisticUpdate, Upd
|
||||||
// implements https://github.com/ethereum/beacon-APIs/tree/master/apis/beacon/light_client
|
// implements https://github.com/ethereum/beacon-APIs/tree/master/apis/beacon/light_client
|
||||||
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
|
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
|
||||||
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
|
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
|
||||||
pub trait ConsensusNetworkInterface {
|
pub trait ConsensusNetworkInterface: Sync + Send + 'static {
|
||||||
fn new(path: &str) -> Self;
|
fn new(path: &str) -> Self;
|
||||||
async fn get_bootstrap(&self, block_root: &'_ [u8]) -> Result<Bootstrap>;
|
async fn get_bootstrap(&self, block_root: &'_ [u8]) -> Result<Bootstrap>;
|
||||||
async fn get_updates(&self, period: u64, count: u8) -> Result<Vec<Update>>;
|
async fn get_updates(&self, period: u64, count: u8) -> Result<Vec<Update>>;
|
||||||
|
|
Loading…
Reference in New Issue