Skip to content

Commit

Permalink
fix missing field
Browse files Browse the repository at this point in the history
  • Loading branch information
YadominJinta committed Dec 6, 2024
1 parent 4582ae5 commit 49a83b1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
5 changes: 2 additions & 3 deletions crates/cli/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ pub struct Args {
pub initial_backoff: u64,

/// The number of compute units per second for this provider
#[arg(long, default_value_t = 50, value_name = "U", help_heading="Acquisition Options")]
pub compute_units_per_second: u64,

#[arg(long, default_value_t = 50, value_name = "U", help_heading = "Acquisition Options")]
pub compute_units_per_second: u64,

/// Global number of concurrent requests
#[arg(long, value_name = "M", help_heading = "Acquisition Options")]
Expand Down
12 changes: 9 additions & 3 deletions crates/cli/src/parse/timestamps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,11 @@ async fn get_latest_timestamp(source: Arc<Source>) -> Result<u64, ParseError> {
mod tests {
use std::num::NonZeroU32;

use alloy::{providers::ProviderBuilder, rpc::client::{BuiltInConnectionString, ClientBuilder, RpcClient}, transports::{layers::RetryBackoffLayer, BoxTransport}};
use alloy::{
providers::ProviderBuilder,
rpc::client::{BuiltInConnectionString, ClientBuilder, RpcClient},
transports::{layers::RetryBackoffLayer, BoxTransport},
};
use governor::{Quota, RateLimiter};

use super::*;
Expand All @@ -339,8 +343,10 @@ mod tests {
let initial_backoff = 500;
let compute_units_per_second = 50;
let max_concurrent_requests = 100;
let retry_layer = RetryBackoffLayer::new(max_retry, initial_backoff, compute_units_per_second);
let connect: BuiltInConnectionString = rpc_url.parse().map_err(ParseError::ProviderError).unwrap();
let retry_layer =
RetryBackoffLayer::new(max_retry, initial_backoff, compute_units_per_second);
let connect: BuiltInConnectionString =
rpc_url.parse().map_err(ParseError::ProviderError).unwrap();
let client: RpcClient<BoxTransport> = ClientBuilder::default()
.layer(retry_layer)
.connect_boxed(connect)
Expand Down
3 changes: 3 additions & 0 deletions crates/python/rust/collect_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use cryo_freeze::collect;
chunk_order = None,
max_retries = 10,
initial_backoff = 500,
compute_units_per_second = 50,
dry = false,
chunk_size = 1000,
n_chunks = None,
Expand Down Expand Up @@ -92,6 +93,7 @@ pub fn _collect(
chunk_order: Option<String>,
max_retries: u32,
initial_backoff: u64,
compute_units_per_second: u64,
dry: bool,
chunk_size: u64,
n_chunks: Option<u64>,
Expand Down Expand Up @@ -157,6 +159,7 @@ pub fn _collect(
chunk_order,
max_retries,
initial_backoff,
compute_units_per_second,
dry,
chunk_size,
n_chunks,
Expand Down
3 changes: 3 additions & 0 deletions crates/python/rust/freeze_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ use cryo_cli::{run, Args};
chunk_order = None,
max_retries = 10,
initial_backoff = 500,
compute_units_per_second = 50,
dry = false,
chunk_size = 1000,
n_chunks = None,
Expand Down Expand Up @@ -89,6 +90,7 @@ pub fn _freeze(
chunk_order: Option<String>,
max_retries: u32,
initial_backoff: u64,
compute_units_per_second: u64,
dry: bool,
chunk_size: u64,
n_chunks: Option<u64>,
Expand Down Expand Up @@ -149,6 +151,7 @@ pub fn _freeze(
chunk_order,
max_retries,
initial_backoff,
compute_units_per_second,
dry,
chunk_size,
n_chunks,
Expand Down

0 comments on commit 49a83b1

Please sign in to comment.