Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
themicp committed Feb 19, 2024
1 parent 58aa534 commit 2e99133
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions relayer/src/bin/feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ impl<V: VerifierAPI, CR: EthBeaconAPI> Feeder<V, CR> {
}
}

pub async fn tick(&self) -> () {
pub async fn tick(&self) {
let latest_header = self.consensus.get_latest_beacon_block_header().await;
if latest_header.is_err() {
error!(
"Error getting latest header from consensus: {:?}",
latest_header.err()
);
return ();
return;
}
let latest_header = latest_header.unwrap();
let latest_period = calc_sync_period(latest_header.slot);

let state = self.verifier.get_state().await;
if state.is_err() {
error!("Error getting state from wasm: {:?}", state.err());
return ();
return;
}
let state = state.unwrap();
let verifier_period = calc_sync_period(state.update_slot);
Expand All @@ -54,7 +54,7 @@ impl<V: VerifierAPI, CR: EthBeaconAPI> Feeder<V, CR> {
);
if latest_period == verifier_period {
debug!("No updates to process");
return ();
return;
}

let start_update_period = if is_on_bootstrap {
Expand All @@ -73,7 +73,7 @@ impl<V: VerifierAPI, CR: EthBeaconAPI> Feeder<V, CR> {
.await;
if updates.is_err() {
error!("Error getting updates from consensus: {:?}", updates.err());
return ();
return;
}
let updates = updates.unwrap();
info!(
Expand All @@ -98,7 +98,7 @@ impl<V: VerifierAPI, CR: EthBeaconAPI> Feeder<V, CR> {
}
}

pub async fn start(&self, sleep_duration: Duration) -> () {
pub async fn start(&self, sleep_duration: Duration) {
loop {
self.tick().await;

Expand Down

0 comments on commit 2e99133

Please sign in to comment.