add traits

This commit is contained in:
geemo 2023-03-02 02:27:54 -06:00
parent c2237668ea
commit 7d7ac4b5aa
1 changed files with 1 additions and 1 deletions

View File

@ -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
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
pub trait ConsensusNetworkInterface {
pub trait ConsensusNetworkInterface: Sync + Send + 'static {
fn new(path: &str) -> Self;
async fn get_bootstrap(&self, block_root: &'_ [u8]) -> Result<Bootstrap>;
async fn get_updates(&self, period: u64, count: u8) -> Result<Vec<Update>>;