Skip to content

Commit

Permalink
Some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
naps62 committed Dec 15, 2023
1 parent f23cb26 commit a2b35e3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions benches/provider_concurrency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use tokio::task;
async fn run_multiple_providers(blocks: u64, concurrency: usize) -> Result<()> {
let spec = (*reth_primitives::SEPOLIA).clone();
let path = Path::new("/mnt/data/eth/sepolia/reth/db");
let db = open_db_read_only(&path, None)?;
let db = open_db_read_only(path, None)?;

let factory: ProviderFactory<reth_db::DatabaseEnv> = ProviderFactory::new(db, spec.clone());

Expand All @@ -25,8 +25,8 @@ async fn run_multiple_providers(blocks: u64, concurrency: usize) -> Result<()> {
for block in from..to {
let indices = provider.block_body_indices(block as u64).unwrap().unwrap();
for id in indices.first_tx_num..indices.first_tx_num + indices.tx_count {
let tx = provider.transaction_by_id_no_hash(id).unwrap();
let receipt = provider.receipt(id).unwrap();
let _tx = provider.transaction_by_id_no_hash(id).unwrap();
let _receipt = provider.receipt(id).unwrap();
}
//println!("finished {}", block);
}
Expand Down
4 changes: 2 additions & 2 deletions benches/usdc_holders_backfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use iron_indexer::{
db::{types::Address, Db},
sync::{BackfillManager, StopStrategy},
};
use tokio::sync::{mpsc, RwLock};
use tokio::sync::mpsc;

use self::utils::one_time_setup;

Expand Down Expand Up @@ -56,7 +56,7 @@ async fn run(config: Config) -> Result<()> {
let db = Db::connect(&config, account_tx, job_tx).await?;
let chain = db.setup_chain(&config.chain).await?;

let provider_factory = Arc::new(RwLock::new(RethProvider::new(&config, &chain)?));
let provider_factory = Arc::new(RethProvider::new(&config, &chain)?);
let backfill = BackfillManager::new(
db.clone(),
&config,
Expand Down
3 changes: 3 additions & 0 deletions benches/utils/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![cfg(test)]
#![allow(dead_code)]

use std::{env, path::PathBuf};

use color_eyre::{eyre::eyre, Result};
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod api;
pub mod config;
pub mod db;
pub mod rearrange;
Expand Down

0 comments on commit a2b35e3

Please sign in to comment.