From 007d3d3df89ff55c4a3b3015eb94a0fa5b4eb289 Mon Sep 17 00:00:00 2001 From: Isaac Patka Date: Mon, 31 Jul 2023 17:55:42 -0400 Subject: [PATCH 1/5] unit tests --- crates/cli/src/parse/blocks.rs | 151 +++++++++++++++++++++++++++++++-- 1 file changed, 144 insertions(+), 7 deletions(-) diff --git a/crates/cli/src/parse/blocks.rs b/crates/cli/src/parse/blocks.rs index 872cd65a..be1ec62d 100644 --- a/crates/cli/src/parse/blocks.rs +++ b/crates/cli/src/parse/blocks.rs @@ -53,12 +53,16 @@ enum RangePosition { None, } -async fn parse_block_token( +async fn parse_block_token

( s: &str, as_range: bool, - provider: &Provider, -) -> Result { + provider: &Provider

, +) -> Result +where + P: JsonRpcClient, +{ let s = s.replace('_', ""); + let parts: Vec<&str> = s.split(':').collect(); match parts.as_slice() { [block_ref] => { @@ -114,11 +118,14 @@ async fn parse_block_token( } } -async fn parse_block_number( +async fn parse_block_number

( block_ref: &str, range_position: RangePosition, - provider: &Provider, -) -> Result { + provider: &Provider

, +) -> Result +where + P: JsonRpcClient, +{ match (block_ref, range_position) { ("latest", _) => provider.get_block_number().await.map(|n| n.as_u64()).map_err(|_e| { ParseError::ParseError("Error retrieving latest block number".to_string()) @@ -166,7 +173,7 @@ async fn apply_reorg_buffer( let latest_block = match provider.get_block_number().await { Ok(result) => result.as_u64(), Err(_e) => { - return Err(ParseError::ParseError("reorg buffer parse error".to_string())) + return Err(ParseError::ParseError("reorg buffer parse error".to_string())); } }; let max_allowed = latest_block - reorg_filter; @@ -180,3 +187,133 @@ async fn apply_reorg_buffer( } } } + +#[cfg(test)] +mod tests { + use super::*; + + enum BlockTokenTest<'a> { + WithoutMock((&'a str, BlockChunk)), // Token | Expected + WithMock((&'a str, BlockChunk, u64)), // Token | Expected | Mock Block Response + } + + async fn block_token_test_helper(tests: Vec<(BlockTokenTest<'_>, bool)>) { + let (provider, mock) = Provider::mocked(); + for (test, res) in tests { + match test { + BlockTokenTest::WithMock((token, expected, latest)) => { + mock.push(U64::from(latest)).unwrap(); + assert_eq!(block_token_test_executor(&token, expected, &provider).await, res); + } + BlockTokenTest::WithoutMock((token, expected)) => { + assert_eq!(block_token_test_executor(&token, expected, &provider).await, res); + } + } + } + } + + async fn block_token_test_executor

( + token: &str, + expected: BlockChunk, + provider: &Provider

, + ) -> bool + where + P: JsonRpcClient, + { + match expected { + BlockChunk::Numbers(expected_block_numbers) => { + let block_chunks = parse_block_token(token, false, &provider).await.unwrap(); + assert!(matches!(block_chunks, BlockChunk::Numbers { .. })); + let BlockChunk::Numbers(block_numbers) = block_chunks else { + panic!("Unexpected shape") + }; + return block_numbers == expected_block_numbers; + } + BlockChunk::Range(expected_range_start, expected_range_end) => { + let block_chunks = parse_block_token(token, true, &provider).await.unwrap(); + assert!(matches!(block_chunks, BlockChunk::Range { .. })); + let BlockChunk::Range(range_start, range_end) = block_chunks else { + panic!("Unexpected shape") + }; + return expected_range_start == range_start && expected_range_end == range_end; + } + } + } + + enum BlockNumberTest<'a> { + WithoutMock((&'a str, RangePosition, u64)), + WithMock((&'a str, RangePosition, u64, u64)), + } + async fn block_number_test_helper(tests: Vec<(BlockNumberTest<'_>, bool)>) { + let (provider, mock) = Provider::mocked(); + for (test, res) in tests { + match test { + BlockNumberTest::WithMock((block_ref, range_position, expected, latest)) => { + mock.push(U64::from(latest)).unwrap(); + assert_eq!( + block_number_test_executor(&block_ref, range_position, expected, &provider) + .await, + res + ); + } + BlockNumberTest::WithoutMock((block_ref, range_position, expected)) => { + assert_eq!( + block_number_test_executor(&block_ref, range_position, expected, &provider) + .await, + res + ); + } + } + } + } + + async fn block_number_test_executor

( + block_ref: &str, + range_position: RangePosition, + expected: u64, + provider: &Provider

, + ) -> bool + where + P: JsonRpcClient, + { + let block_number = parse_block_number(block_ref, range_position, &provider).await.unwrap(); + return block_number == expected; + } + + #[tokio::test] + async fn block_token_parsing() { + // Ranges + let tests: Vec<(BlockTokenTest<'_>, bool)> = vec![ + // Range Type + (BlockTokenTest::WithoutMock((r"1:2", BlockChunk::Range(1,2))), true), // Single block range + (BlockTokenTest::WithoutMock((r"0:2", BlockChunk::Range(0, 2))), true), // Implicit start + (BlockTokenTest::WithoutMock((r"-10:100", BlockChunk::Range(90, 100))), true), // Relative negative + (BlockTokenTest::WithoutMock((r"10:+100", BlockChunk::Range(10, 110))), true), // Relative positive + (BlockTokenTest::WithMock((r"1:latest", BlockChunk::Range(1, 12), 12)), true), // Explicit latest + (BlockTokenTest::WithMock((r"1:", BlockChunk::Range(1, 12), 12)), true), // Implicit latest + // Number type + (BlockTokenTest::WithoutMock((r"1", BlockChunk::Numbers(vec![1]))), true), // Single block + // (BlockTokenTest::WithoutMock((r"1 2", BlockChunk::Numbers(vec![1, 2]))), true), // Multi block + ]; + block_token_test_helper(tests).await; + } + + #[tokio::test] + async fn block_number_parsing() { + // Ranges + let tests: Vec<(BlockNumberTest<'_>, bool)> = vec![ + (BlockNumberTest::WithoutMock((r"1", RangePosition::None, 1)), true), // Integer + (BlockNumberTest::WithMock((r"latest", RangePosition::None, 12, 12)), true), // Lastest block + (BlockNumberTest::WithoutMock((r"", RangePosition::First, 0)), true), // First block + (BlockNumberTest::WithMock((r"", RangePosition::Last, 12, 12)), true), // Last block + (BlockNumberTest::WithoutMock((r"1B", RangePosition::None, 1000000000)), true), // B + (BlockNumberTest::WithoutMock((r"1M", RangePosition::None, 1000000)), true), // M + (BlockNumberTest::WithoutMock((r"1K", RangePosition::None, 1000)), true), // K + (BlockNumberTest::WithoutMock((r"1b", RangePosition::None, 1000000000)), true), // b + (BlockNumberTest::WithoutMock((r"1m", RangePosition::None, 1000000)), true), // m + (BlockNumberTest::WithoutMock((r"1k", RangePosition::None, 1000)), true), // k + ]; + block_number_test_helper(tests).await; + } +} + From 480c8d6eba9f0f63ed994ce2ceb86d5e61026dec Mon Sep 17 00:00:00 2001 From: Isaac Patka Date: Mon, 31 Jul 2023 19:15:12 -0400 Subject: [PATCH 2/5] Add terminator --- crates/cli/src/args.rs | 2 + crates/cli/src/parse/blocks.rs | 101 +++++++++++++++++++++++++++++++-- 2 files changed, 97 insertions(+), 6 deletions(-) diff --git a/crates/cli/src/args.rs b/crates/cli/src/args.rs index 225b289b..341f2ba4 100644 --- a/crates/cli/src/args.rs +++ b/crates/cli/src/args.rs @@ -14,6 +14,8 @@ pub struct Args { short, long, default_value = "0:latest", + num_args = 1.., + value_terminator = ";", allow_hyphen_values(true), help_heading = "Content Options" )] diff --git a/crates/cli/src/parse/blocks.rs b/crates/cli/src/parse/blocks.rs index be1ec62d..d9a85cf7 100644 --- a/crates/cli/src/parse/blocks.rs +++ b/crates/cli/src/parse/blocks.rs @@ -26,10 +26,13 @@ pub(crate) async fn parse_blocks( } /// parse block numbers to freeze -async fn parse_block_inputs( +async fn parse_block_inputs

( inputs: &Vec, - provider: &Provider, -) -> Result, ParseError> { + provider: &Provider

, +) -> Result, ParseError> +where + P: JsonRpcClient, +{ match inputs.len() { 1 => { let first_input = inputs.get(0).ok_or_else(|| { @@ -240,10 +243,67 @@ mod tests { } } + enum BlockInputTest<'a> { + WithoutMock((&'a Vec, Vec)), // Token | Expected + WithMock((&'a Vec, Vec, u64)), // Token | Expected | Mock Block Response + } + + async fn block_input_test_helper(tests: Vec<(BlockInputTest<'_>, bool)>) { + let (provider, mock) = Provider::mocked(); + for (test, res) in tests { + match test { + BlockInputTest::WithMock((inputs, expected, latest)) => { + mock.push(U64::from(latest)).unwrap(); + assert_eq!(block_input_test_executor(&inputs, expected, &provider).await, res); + } + BlockInputTest::WithoutMock((inputs, expected)) => { + assert_eq!(block_input_test_executor(&inputs, expected, &provider).await, res); + } + } + } + } + + async fn block_input_test_executor

( + inputs: &Vec, + expected: Vec, + provider: &Provider

, + ) -> bool + where + P: JsonRpcClient, + { + let block_chunks = parse_block_inputs(inputs, &provider).await.unwrap(); + assert_eq!(block_chunks.len(), expected.len()); + for (i, block_chunk) in block_chunks.iter().enumerate() { + let expected_chunk = &expected[i]; + match expected_chunk { + BlockChunk::Numbers(expected_block_numbers) => { + assert!(matches!(block_chunk, BlockChunk::Numbers { .. })); + let BlockChunk::Numbers(block_numbers) = block_chunk else { + panic!("Unexpected shape") + }; + if expected_block_numbers != block_numbers { + return false; + } + } + BlockChunk::Range(expected_range_start, expected_range_end) => { + assert!(matches!(block_chunk, BlockChunk::Range { .. })); + let BlockChunk::Range(range_start, range_end) = block_chunk else { + panic!("Unexpected shape") + }; + if expected_range_start != range_start || expected_range_end != range_end { + return false; + } + } + } + } + return true; + } + enum BlockNumberTest<'a> { WithoutMock((&'a str, RangePosition, u64)), WithMock((&'a str, RangePosition, u64, u64)), } + async fn block_number_test_helper(tests: Vec<(BlockNumberTest<'_>, bool)>) { let (provider, mock) = Provider::mocked(); for (test, res) in tests { @@ -285,7 +345,7 @@ mod tests { // Ranges let tests: Vec<(BlockTokenTest<'_>, bool)> = vec![ // Range Type - (BlockTokenTest::WithoutMock((r"1:2", BlockChunk::Range(1,2))), true), // Single block range + (BlockTokenTest::WithoutMock((r"1:2", BlockChunk::Range(1, 2))), true), // Single block range (BlockTokenTest::WithoutMock((r"0:2", BlockChunk::Range(0, 2))), true), // Implicit start (BlockTokenTest::WithoutMock((r"-10:100", BlockChunk::Range(90, 100))), true), // Relative negative (BlockTokenTest::WithoutMock((r"10:+100", BlockChunk::Range(10, 110))), true), // Relative positive @@ -293,11 +353,41 @@ mod tests { (BlockTokenTest::WithMock((r"1:", BlockChunk::Range(1, 12), 12)), true), // Implicit latest // Number type (BlockTokenTest::WithoutMock((r"1", BlockChunk::Numbers(vec![1]))), true), // Single block - // (BlockTokenTest::WithoutMock((r"1 2", BlockChunk::Numbers(vec![1, 2]))), true), // Multi block ]; block_token_test_helper(tests).await; } + #[tokio::test] + async fn block_inputs_parsing() { + // Ranges + let block_inputs_single = vec![String::from(r"1:2")]; + let block_inputs_multiple = vec![String::from(r"1"), String::from(r"2")]; + let block_inputs_latest = vec![String::from(r"1:latest")]; + let tests: Vec<(BlockInputTest<'_>, bool)> = vec![ + // Range Type + ( + BlockInputTest::WithoutMock((&block_inputs_single, vec![BlockChunk::Range(1, 2)])), + true, + ), // Single input + ( + BlockInputTest::WithoutMock(( + &block_inputs_multiple, + vec![BlockChunk::Numbers(vec![1]), BlockChunk::Numbers(vec![2])], + )), + true, + ), // Multi input + ( + BlockInputTest::WithMock(( + &block_inputs_latest, + vec![BlockChunk::Range(1, 12)], + 12, + )), + true, + ), // Single input latest + ]; + block_input_test_helper(tests).await; + } + #[tokio::test] async fn block_number_parsing() { // Ranges @@ -316,4 +406,3 @@ mod tests { block_number_test_helper(tests).await; } } - From 4b8a0b158a89819a9489fd38373ae2f523d23221 Mon Sep 17 00:00:00 2001 From: Isaac Patka Date: Mon, 31 Jul 2023 19:20:13 -0400 Subject: [PATCH 3/5] Update readme --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c3941b2..44aa4d3c 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,8 @@ Dataset-specific Options: Block specification syntax -- can use numbers --blocks 5000 6000 7000 +- can use numbers --blocks 5000 +- can use numbers list (include ;) --blocks 5000 6000 7000; - can use ranges --blocks 12M:13M 15M:16M - numbers can contain { _ . K M B } 5_000 5K 15M 15.5M - omiting range end means latest 15.5M: == 15.5M:latest From 616a82d4471127e18ef2c78329d68a2928c1671b Mon Sep 17 00:00:00 2001 From: Isaac Patka Date: Mon, 31 Jul 2023 21:24:14 -0400 Subject: [PATCH 4/5] format --- crates/cli/src/parse/blocks.rs | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/crates/cli/src/parse/blocks.rs b/crates/cli/src/parse/blocks.rs index d9a85cf7..f9d7c912 100644 --- a/crates/cli/src/parse/blocks.rs +++ b/crates/cli/src/parse/blocks.rs @@ -176,7 +176,7 @@ async fn apply_reorg_buffer( let latest_block = match provider.get_block_number().await { Ok(result) => result.as_u64(), Err(_e) => { - return Err(ParseError::ParseError("reorg buffer parse error".to_string())); + return Err(ParseError::ParseError("reorg buffer parse error".to_string())) } }; let max_allowed = latest_block - reorg_filter; @@ -230,7 +230,7 @@ mod tests { let BlockChunk::Numbers(block_numbers) = block_chunks else { panic!("Unexpected shape") }; - return block_numbers == expected_block_numbers; + return block_numbers == expected_block_numbers } BlockChunk::Range(expected_range_start, expected_range_end) => { let block_chunks = parse_block_token(token, true, &provider).await.unwrap(); @@ -238,7 +238,7 @@ mod tests { let BlockChunk::Range(range_start, range_end) = block_chunks else { panic!("Unexpected shape") }; - return expected_range_start == range_start && expected_range_end == range_end; + return expected_range_start == range_start && expected_range_end == range_end } } } @@ -279,24 +279,24 @@ mod tests { BlockChunk::Numbers(expected_block_numbers) => { assert!(matches!(block_chunk, BlockChunk::Numbers { .. })); let BlockChunk::Numbers(block_numbers) = block_chunk else { - panic!("Unexpected shape") - }; + panic!("Unexpected shape") + }; if expected_block_numbers != block_numbers { - return false; + return false } } BlockChunk::Range(expected_range_start, expected_range_end) => { assert!(matches!(block_chunk, BlockChunk::Range { .. })); let BlockChunk::Range(range_start, range_end) = block_chunk else { - panic!("Unexpected shape") - }; + panic!("Unexpected shape") + }; if expected_range_start != range_start || expected_range_end != range_end { - return false; + return false } } } } - return true; + return true } enum BlockNumberTest<'a> { @@ -337,7 +337,7 @@ mod tests { P: JsonRpcClient, { let block_number = parse_block_number(block_ref, range_position, &provider).await.unwrap(); - return block_number == expected; + return block_number == expected } #[tokio::test] @@ -345,14 +345,14 @@ mod tests { // Ranges let tests: Vec<(BlockTokenTest<'_>, bool)> = vec![ // Range Type - (BlockTokenTest::WithoutMock((r"1:2", BlockChunk::Range(1, 2))), true), // Single block range - (BlockTokenTest::WithoutMock((r"0:2", BlockChunk::Range(0, 2))), true), // Implicit start - (BlockTokenTest::WithoutMock((r"-10:100", BlockChunk::Range(90, 100))), true), // Relative negative - (BlockTokenTest::WithoutMock((r"10:+100", BlockChunk::Range(10, 110))), true), // Relative positive - (BlockTokenTest::WithMock((r"1:latest", BlockChunk::Range(1, 12), 12)), true), // Explicit latest - (BlockTokenTest::WithMock((r"1:", BlockChunk::Range(1, 12), 12)), true), // Implicit latest + (BlockTokenTest::WithoutMock((r"1:2", BlockChunk::Range(1, 2))), true), /* Single block range */ + (BlockTokenTest::WithoutMock((r"0:2", BlockChunk::Range(0, 2))), true), /* Implicit start */ + (BlockTokenTest::WithoutMock((r"-10:100", BlockChunk::Range(90, 100))), true), /* Relative negative */ + (BlockTokenTest::WithoutMock((r"10:+100", BlockChunk::Range(10, 110))), true), /* Relative positive */ + (BlockTokenTest::WithMock((r"1:latest", BlockChunk::Range(1, 12), 12)), true), /* Explicit latest */ + (BlockTokenTest::WithMock((r"1:", BlockChunk::Range(1, 12), 12)), true), /* Implicit latest */ // Number type - (BlockTokenTest::WithoutMock((r"1", BlockChunk::Numbers(vec![1]))), true), // Single block + (BlockTokenTest::WithoutMock((r"1", BlockChunk::Numbers(vec![1]))), true), /* Single block */ ]; block_token_test_helper(tests).await; } @@ -393,7 +393,7 @@ mod tests { // Ranges let tests: Vec<(BlockNumberTest<'_>, bool)> = vec![ (BlockNumberTest::WithoutMock((r"1", RangePosition::None, 1)), true), // Integer - (BlockNumberTest::WithMock((r"latest", RangePosition::None, 12, 12)), true), // Lastest block + (BlockNumberTest::WithMock((r"latest", RangePosition::None, 12, 12)), true), /* Lastest block */ (BlockNumberTest::WithoutMock((r"", RangePosition::First, 0)), true), // First block (BlockNumberTest::WithMock((r"", RangePosition::Last, 12, 12)), true), // Last block (BlockNumberTest::WithoutMock((r"1B", RangePosition::None, 1000000000)), true), // B From 619b190b9fa0ac162dae65ed3187cddd669f7a68 Mon Sep 17 00:00:00 2001 From: Isaac Patka Date: Mon, 7 Aug 2023 13:41:37 -0400 Subject: [PATCH 5/5] Wrap block lists with quote --- README.md | 3 ++- crates/cli/src/args.rs | 2 +- crates/cli/src/parse/blocks.rs | 38 +++++++++++++++++++--------- crates/python/src/collect_adapter.rs | 2 +- crates/python/src/freeze_adapter.rs | 2 +- 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 61111e37..7b42545c 100644 --- a/README.md +++ b/README.md @@ -176,12 +176,13 @@ Dataset-specific Options: Block specification syntax - can use numbers --blocks 5000 -- can use numbers list (include ;) --blocks 5000 6000 7000; +- can use numbers list (use "") --blocks "5000 6000 7000" - can use ranges --blocks 12M:13M 15M:16M - numbers can contain { _ . K M B } 5_000 5K 15M 15.5M - omiting range end means latest 15.5M: == 15.5M:latest - omitting range start means 0 :700 == 0:700 - minus on start means minus end -1000:7000 == 6000:7000 - plus sign on end means plus start 15M:+1000 == 15M:15.001K +- mix formats "15M:+1 1000:1002 -3:1b 2000" ``` diff --git a/crates/cli/src/args.rs b/crates/cli/src/args.rs index de1f7583..c671810e 100644 --- a/crates/cli/src/args.rs +++ b/crates/cli/src/args.rs @@ -11,7 +11,7 @@ pub struct Args { /// Block numbers, see syntax below #[arg(short, long, allow_hyphen_values(true), help_heading = "Content Options")] - pub blocks: Option>, + pub blocks: Option, /// Transaction hashes, see syntax below #[arg( diff --git a/crates/cli/src/parse/blocks.rs b/crates/cli/src/parse/blocks.rs index a8bde0b2..1dd0df14 100644 --- a/crates/cli/src/parse/blocks.rs +++ b/crates/cli/src/parse/blocks.rs @@ -50,29 +50,30 @@ pub(crate) async fn get_default_block_chunks( args: &Args, provider: Arc>, ) -> Result, ParseError> { - let block_chunks = parse_block_inputs(&vec!["0:latest".to_string()], &provider).await?; + let block_chunks = parse_block_inputs(&String::from(r"0:latest"), &provider).await?; postprocess_block_chunks(block_chunks, args, provider).await } /// parse block numbers to freeze async fn parse_block_inputs

( - inputs: &Vec, + inputs: &str, provider: &Provider

, ) -> Result, ParseError> where P: JsonRpcClient, { - match inputs.len() { + let parts: Vec<&str> = inputs.split(' ').collect(); + match parts.len() { 1 => { - let first_input = inputs.get(0).ok_or_else(|| { + let first_input = parts.get(0).ok_or_else(|| { ParseError::ParseError("Failed to get the first input".to_string()) })?; parse_block_token(first_input, true, provider).await.map(|x| vec![x]) } _ => { let mut chunks = Vec::new(); - for input in inputs { - chunks.push(parse_block_token(input, false, provider).await?); + for part in parts { + chunks.push(parse_block_token(part, false, provider).await?); } Ok(chunks) } @@ -273,8 +274,8 @@ mod tests { } enum BlockInputTest<'a> { - WithoutMock((&'a Vec, Vec)), // Token | Expected - WithMock((&'a Vec, Vec, u64)), // Token | Expected | Mock Block Response + WithoutMock((&'a String, Vec)), // Token | Expected + WithMock((&'a String, Vec, u64)), // Token | Expected | Mock Block Response } async fn block_input_test_helper(tests: Vec<(BlockInputTest<'_>, bool)>) { @@ -293,7 +294,7 @@ mod tests { } async fn block_input_test_executor

( - inputs: &Vec, + inputs: &String, expected: Vec, provider: &Provider

, ) -> bool @@ -389,9 +390,10 @@ mod tests { #[tokio::test] async fn block_inputs_parsing() { // Ranges - let block_inputs_single = vec![String::from(r"1:2")]; - let block_inputs_multiple = vec![String::from(r"1"), String::from(r"2")]; - let block_inputs_latest = vec![String::from(r"1:latest")]; + let block_inputs_single = String::from(r"1:2"); + let block_inputs_multiple = String::from(r"1 2"); + let block_inputs_latest = String::from(r"1:latest"); + let block_inputs_multiple_complex = String::from(r"15M:+1 1000:1002 -3:1b 2000"); let tests: Vec<(BlockInputTest<'_>, bool)> = vec![ // Range Type ( @@ -413,6 +415,18 @@ mod tests { )), true, ), // Single input latest + ( + BlockInputTest::WithoutMock(( + &block_inputs_multiple_complex, + vec![ + BlockChunk::Numbers(vec![15000000, 15000001]), + BlockChunk::Numbers(vec![1000, 1001, 1002]), + BlockChunk::Numbers(vec![999999997, 999999998, 999999999, 1000000000]), + BlockChunk::Numbers(vec![2000]), + ], + )), + true, + ), // Multi input complex ]; block_input_test_helper(tests).await; } diff --git a/crates/python/src/collect_adapter.rs b/crates/python/src/collect_adapter.rs index 35ae5729..cf85184b 100644 --- a/crates/python/src/collect_adapter.rs +++ b/crates/python/src/collect_adapter.rs @@ -48,7 +48,7 @@ use cryo_freeze::collect; pub fn _collect( py: Python<'_>, datatype: String, - blocks: Option>, + blocks: Option, txs: Option>, align: bool, reorg_buffer: u64, diff --git a/crates/python/src/freeze_adapter.rs b/crates/python/src/freeze_adapter.rs index 146e4418..e7670771 100644 --- a/crates/python/src/freeze_adapter.rs +++ b/crates/python/src/freeze_adapter.rs @@ -49,7 +49,7 @@ use cryo_cli::{run, Args}; pub fn _freeze( py: Python<'_>, datatype: Vec, - blocks: Option>, + blocks: Option, txs: Option>, align: bool, reorg_buffer: u64,