From 94e7b299131e9d6b6606cc734cbc57c20f197ea3 Mon Sep 17 00:00:00 2001 From: sergerad Date: Mon, 21 Oct 2024 08:19:54 +1300 Subject: [PATCH] lint / cleanup --- zero/src/bin/leader/cli.rs | 3 ++- zero/src/bin/rpc.rs | 3 --- zero/src/block_interval.rs | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/zero/src/bin/leader/cli.rs b/zero/src/bin/leader/cli.rs index 5f1ea0705..6827d5814 100644 --- a/zero/src/bin/leader/cli.rs +++ b/zero/src/bin/leader/cli.rs @@ -46,6 +46,7 @@ pub enum WorkerRunMode { Default, } +#[allow(clippy::large_enum_variant)] #[derive(Subcommand)] pub(crate) enum Command { /// Deletes all the previously cached circuits. @@ -70,7 +71,7 @@ pub(crate) enum Command { /// The end of the block range to prove (inclusive). #[arg(long, short = 'e')] end_block: Option, - /// The checkpoint block number. + /// The checkpoint block. #[arg(short, long, default_value = "0")] checkpoint_block: BlockId, /// The previous proof output. diff --git a/zero/src/bin/rpc.rs b/zero/src/bin/rpc.rs index bf2f929bc..a8a42a6d4 100644 --- a/zero/src/bin/rpc.rs +++ b/zero/src/bin/rpc.rs @@ -25,7 +25,6 @@ struct FetchParams { pub start_block: u64, pub end_block: u64, pub checkpoint_block_number: Option, - pub rpc_type: RpcType, } #[derive(Args, Clone, Debug)] @@ -127,7 +126,6 @@ impl Cli { start_block, end_block, checkpoint_block_number, - rpc_type: self.config.rpc_type, }; let block_prover_inputs = @@ -153,7 +151,6 @@ impl Cli { start_block: block_number, end_block: block_number, checkpoint_block_number: None, - rpc_type: self.config.rpc_type, }; let block_prover_inputs = diff --git a/zero/src/block_interval.rs b/zero/src/block_interval.rs index 6d895eb6c..7ca4f2366 100644 --- a/zero/src/block_interval.rs +++ b/zero/src/block_interval.rs @@ -3,14 +3,12 @@ use std::pin::Pin; use std::sync::Arc; use alloy::rpc::types::eth::BlockId; -use alloy::rpc::types::{Block, BlockTransactionsKind}; -use alloy::{providers::Provider, transports::Transport}; use anyhow::{anyhow, Result}; use async_stream::try_stream; use futures::Stream; use tracing::info; -use crate::provider::{BlockProvider, CachedProvider}; +use crate::provider::BlockProvider; /// The async stream of block numbers. /// The second bool flag indicates if the element is last in the interval. @@ -179,7 +177,7 @@ impl std::fmt::Display for BlockInterval { #[cfg(test)] mod test { use alloy::primitives::B256; - use alloy::rpc::types::{Header, Transaction}; + use alloy::rpc::types::{Block, Header, Transaction}; use mockall::predicate::*; use super::*;