Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yaziciahmet committed Dec 18, 2024
1 parent 487c84a commit 0b69f36
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions bin/citrea/src/rollup/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub trait CitreaRollupBlueprint: RollupBlueprint {
<Self::NativeContext as Spec>::Storage: NativeStorage,
{
// Set forks before anything
set_forks(rollup_config.forks.clone());
set_forks(rollup_config.forks);

let mut task_manager = TaskManager::default();
let da_service = self
Expand Down Expand Up @@ -176,7 +176,7 @@ pub trait CitreaRollupBlueprint: RollupBlueprint {
<Self::NativeContext as Spec>::Storage: NativeStorage,
{
// Set forks before anything
set_forks(rollup_config.forks.clone());
set_forks(rollup_config.forks);

let mut task_manager = TaskManager::default();
let da_service = self
Expand Down Expand Up @@ -311,7 +311,7 @@ pub trait CitreaRollupBlueprint: RollupBlueprint {
<Self::NativeContext as Spec>::Storage: NativeStorage,
{
// Set forks before anything
set_forks(rollup_config.forks.clone());
set_forks(rollup_config.forks);

let mut task_manager = TaskManager::default();
let da_service = self
Expand Down Expand Up @@ -445,7 +445,7 @@ pub trait CitreaRollupBlueprint: RollupBlueprint {
<Self::NativeContext as Spec>::Storage: NativeStorage,
{
// Set forks before anything
set_forks(rollup_config.forks.clone());
set_forks(rollup_config.forks);

// Migrate before constructing ledger_db instance so that no lock is present.
let migrator = LedgerDBMigrator::new(
Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl FromEnv for LightClientProverConfig {
impl FromEnv for Forks {
fn from_env() -> anyhow::Result<Self> {
let forks = std::env::var("FORKS")?;
Ok(Forks::from_utf8(&forks).ok_or(anyhow::anyhow!("Invalid FORKS env variable"))?)
Forks::from_utf8(&forks).ok_or(anyhow::anyhow!("Invalid FORKS env variable"))
}
}

Expand Down
1 change: 1 addition & 0 deletions crates/prover-services/src/parallel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ where
Stf::PreState: Clone + Send + Sync,
{
/// Creates a new prover.
#[allow(clippy::too_many_arguments)]
pub fn new(
da_service: Arc<Da>,
vm: Vm,
Expand Down
6 changes: 3 additions & 3 deletions crates/sovereign-sdk/rollup-interface/src/fork/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@ pub(crate) const fn verify_forks(forks: &[Fork]) -> bool {
/// This assumes that the list of forks is sorted by block number in ascending fashion.
pub(crate) fn fork_pos_from_block_number(forks: &[Fork], block_number: u64) -> usize {
let pos = forks.binary_search_by(|fork| fork.activation_height.cmp(&block_number));
let active_fork_idx = match pos {

match pos {
Ok(idx) => idx,
Err(idx) => idx.saturating_sub(1),
};
active_fork_idx
}
}

0 comments on commit 0b69f36

Please sign in to comment.