Skip to content

Commit

Permalink
Run clippy/fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
pkakelas committed Jan 18, 2024
1 parent 93e0a33 commit 2016015
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
10 changes: 6 additions & 4 deletions relayer/src/bin/feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ async fn main() {
}

let start_update_period = if is_on_bootstrap {
info!("Verifier is on bootstrap. Will apply updates starting from period {}", verifier_period);
info!(
"Verifier is on bootstrap. Will apply updates starting from period {}",
verifier_period
);
verifier_period
}
else {
} else {
verifier_period + 1
};

Expand Down Expand Up @@ -95,4 +97,4 @@ async fn main() {
debug!("Sleeping for {}", sleep_duration.as_secs());
sleep(sleep_duration).await;
}
}
}
4 changes: 2 additions & 2 deletions relayer/src/consumers/lapin_consumer.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use super::Amqp;
use async_trait::async_trait;
use eyre::{eyre, Result};
use futures::{StreamExt, TryStreamExt};
use futures::StreamExt;
use lapin::{
options::{BasicAckOptions, BasicConsumeOptions, BasicNackOptions},
types::FieldTable,
Channel, Connection, ConnectionProperties, Consumer,
};
use log::{debug, error, info};
use log::{debug, info};
use mockall::automock;

pub struct LapinConsumer {
Expand Down
8 changes: 4 additions & 4 deletions relayer/src/relayer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use eth::{consensus::EthBeaconAPI, execution::EthExecutionAPI, utils::get_full_b
use eyre::{eyre, Result};
use log::{debug, error, info, warn};
use prover::prover::{errors::StateProverError, types::EnrichedContent, ProverAPI};
use reqwest::Client;

use std::{collections::HashMap, sync::Arc, time::Duration};
use tokio::time::sleep;

Expand Down Expand Up @@ -293,7 +293,7 @@ impl<C: Amqp, P: ProverAPI, CR: EthBeaconAPI, ER: EthExecutionAPI, V: VerifierAP
"Got finality update with slot {}",
update.finalized_header.beacon.slot
);
return Ok(UpdateVariant::Finality(update));
Ok(UpdateVariant::Finality(update))
}
Err(e) => Err(eyre!("Error fetching finality update {}", e)),
},
Expand All @@ -303,7 +303,7 @@ impl<C: Amqp, P: ProverAPI, CR: EthBeaconAPI, ER: EthExecutionAPI, V: VerifierAP
"Got optimistic update with slot {}",
update.attested_header.beacon.slot
);
return Ok(UpdateVariant::Optimistic(update));
Ok(UpdateVariant::Optimistic(update))
}
Err(e) => Err(eyre!("Error fetching finality update {}", e)),
},
Expand Down Expand Up @@ -335,7 +335,7 @@ impl<C: Amqp, P: ProverAPI, CR: EthBeaconAPI, ER: EthExecutionAPI, V: VerifierAP
}

println!("STATE WOULD PASS");
return Ok(true);
Ok(true)
}
}

Expand Down
2 changes: 1 addition & 1 deletion relayer/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use consensus_types::{
use eth::types::EthConfig;
use ethers::{
contract::EthEvent,
types::{Address, Bytes, Log, H256, U256},
types::{Address, Bytes, Log, H256},
};
use prover::prover::types::ProverConfig;
use serde::{Deserialize, Serialize};
Expand Down

0 comments on commit 2016015

Please sign in to comment.