Skip to content

Commit

Permalink
fix: happy fmt && clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
iajoiner committed Oct 28, 2024
1 parent bccc64d commit 17f0d74
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
8 changes: 4 additions & 4 deletions scripts/count-ethereum-core/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
use std::env;
use std::fs::File;
use std::io::BufReader;

use futures::StreamExt;
use indexmap::IndexMap;
use proof_of_sql::base::database::OwnedColumn;
use std::{env, fs::File, io::BufReader};
use sxt_proof_of_sql_sdk::{query_and_verify, SdkArgs};

#[allow(dead_code)]
const ETHEREUM_CORE_COUNTS_FILE: &str = "ethereum-core-counts.json";

const ETHEREUM_CORE_TABLES: [&str; 21] = [
Expand Down Expand Up @@ -57,13 +55,15 @@ async fn count_table(
}

/// Load the previous counts file
#[allow(dead_code)]
async fn load_from_file() -> IndexMap<String, i64> {
let file = File::open(ETHEREUM_CORE_COUNTS_FILE).expect("failed to open file");
let mut reader = BufReader::new(&file);
serde_json::from_reader(&mut reader).expect("failed to parse file")
}

/// Save the current counts to a file
#[allow(dead_code)]
async fn save_to_file(counts: IndexMap<String, i64>) {
let file = File::create(ETHEREUM_CORE_COUNTS_FILE).expect("failed to create file");
serde_json::to_writer(&file, &counts).expect("failed to write file");
Expand Down
18 changes: 7 additions & 11 deletions sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@ mod auth;
mod substrate;
mod sxt_chain_runtime;

use std::collections::HashMap;
use std::path::Path;

use proof_of_sql::base::database::{OwnedTable, TableRef};
use proof_of_sql::proof_primitive::dory::{
DoryScalar,
DynamicDoryCommitment,
DynamicDoryEvaluationProof,
VerifierSetup,
use proof_of_sql::{
base::database::{OwnedTable, TableRef},
proof_primitive::dory::{
DoryScalar, DynamicDoryCommitment, DynamicDoryEvaluationProof, VerifierSetup,
},
sql::{parse::QueryExpr, proof::VerifiableQueryResult},
};
use proof_of_sql::sql::parse::QueryExpr;
use proof_of_sql::sql::proof::VerifiableQueryResult;
use prover::{ProverContextRange, ProverQuery, ProverResponse};
use reqwest::Client;
use std::{collections::HashMap, path::Path};

mod prover {
tonic::include_proto!("sxt.core");
Expand Down

0 comments on commit 17f0d74

Please sign in to comment.