chore: apply some style suggestions (#7307)

This commit is contained in:
Matthias Seitz
2024-03-24 23:52:33 +01:00
committed by GitHub
parent 7e6d61a66a
commit a31202670b
39 changed files with 184 additions and 182 deletions

View File

@ -91,15 +91,15 @@ impl Command {
},
|provider| {
Ok(provider
.header_by_number(num as u64)?
.ok_or(ProviderError::HeaderNotFound((num as u64).into()))?)
.header_by_number(num)?
.ok_or(ProviderError::HeaderNotFound((num).into()))?)
},
)?;
}
// BENCHMARK QUERYING A RANDOM HEADER BY HASH
{
let num = row_indexes[rng.gen_range(0..row_indexes.len())] as u64;
let num = row_indexes[rng.gen_range(0..row_indexes.len())];
let header_hash = provider_factory
.header_by_number(num)?
.ok_or(ProviderError::HeaderNotFound(num.into()))?

View File

@ -141,7 +141,7 @@ impl ImportCommand {
tokio::select! {
res = pipeline.run() => res?,
_ = tokio::signal::ctrl_c() => {},
};
}
info!(target: "reth::cli", "Finishing up");
Ok(())

View File

@ -261,7 +261,7 @@ impl Command {
_ => return Ok(()),
};
if let Some(unwind_stage) = &unwind_stage {
assert!(exec_stage.type_id() == unwind_stage.type_id());
assert_eq!(exec_stage.type_id(), unwind_stage.type_id());
}
let checkpoint = provider_rw.get_stage_checkpoint(exec_stage.id())?.unwrap_or_default();