From 62891537c8ea6a02724dee9c4f0d7158a98df058 Mon Sep 17 00:00:00 2001 From: sifnoc Date: Fri, 15 Mar 2024 11:30:36 +0000 Subject: [PATCH] fix: removed leftover; proper variable name in benchmark --- kzg_prover/benches/kzg.rs | 10 +++++----- kzg_prover/src/utils/dummy_entries.rs | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/kzg_prover/benches/kzg.rs b/kzg_prover/benches/kzg.rs index 17cddaf8..471bca8c 100644 --- a/kzg_prover/benches/kzg.rs +++ b/kzg_prover/benches/kzg.rs @@ -56,11 +56,11 @@ fn bench_kzg< let entries = generate_dummy_entries::().unwrap(); // Calculate total for all entry columns - let mut csv_total: Vec = vec![BigUint::from(0u32); N_CURRENCIES]; + let mut total_balances: Vec = vec![BigUint::from(0u32); N_CURRENCIES]; for entry in &entries { for (i, balance) in entry.balances().iter().enumerate() { - csv_total[i] += balance; + total_balances[i] += balance; } } @@ -90,7 +90,7 @@ fn bench_kzg< &advice_polys.advice_blinds, ¶ms, balance_column_range, - csv_total + total_balances .iter() .map(|x| big_uint_to_fp(&(x)) * Fp::from(poly_length).invert().unwrap()) .collect::>() @@ -110,7 +110,7 @@ fn bench_kzg< &advice_polys.advice_blinds, ¶ms, balance_column_range, - csv_total + total_balances .iter() .map(|x| big_uint_to_fp(&(x)) * Fp::from(poly_length).invert().unwrap()) .collect::>() @@ -187,7 +187,7 @@ fn bench_kzg< &advice_polys.advice_blinds, ¶ms, balance_column_range.clone(), - csv_total + total_balances .iter() .map(|x| big_uint_to_fp(&(x)) * Fp::from(poly_length).invert().unwrap()) .collect::>() diff --git a/kzg_prover/src/utils/dummy_entries.rs b/kzg_prover/src/utils/dummy_entries.rs index 69151e05..f566b9c0 100644 --- a/kzg_prover/src/utils/dummy_entries.rs +++ b/kzg_prover/src/utils/dummy_entries.rs @@ -6,8 +6,7 @@ use std::error::Error; use crate::entry::Entry; // This is for testing purposes with a large dataset instead of using a CSV file -pub fn generate_dummy_entries(// entries: &mut [Entry], - // cryptocurrencies: &mut [Cryptocurrency], +pub fn generate_dummy_entries( ) -> Result>, Box> { // Ensure N_CURRENCIES is greater than 0. if N_CURRENCIES == 0 {