Skip to content

Commit

Permalink
remove error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Aug 8, 2023
1 parent 0a15082 commit 9121bed
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/storage/provider/src/providers/state/historical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use reth_primitives::{
use std::marker::PhantomData;
use tracing::log::error;

Check failure on line 18 in crates/storage/provider/src/providers/state/historical.rs

View workflow job for this annotation

GitHub Actions / clippy

unused import: `tracing::log::error`

error: unused import: `tracing::log::error` --> crates/storage/provider/src/providers/state/historical.rs:18:5 | 18 | use tracing::log::error; | ^^^^^^^^^^^^^^^^^^^ | = note: `-D unused-imports` implied by `-D warnings`

/// State provider for a given transition id which takes a tx reference.
/// State provider for a given block number which takes a tx reference.
///
/// Historical state provider reads the following tables:
/// - [tables::AccountHistory]
Expand Down Expand Up @@ -153,7 +153,6 @@ impl<'a, 'b, TX: DbTx<'a>> HistoricalStateProviderRef<'a, 'b, TX> {
!cursor.prev()?.is_some_and(|(key, _)| key_filter(&key))
{
// The key is written to, but only after our block.
error!("rank == 0 && !cursor.prev()?.is_some_and(|(key, _)| key_filter(&key))");
return Ok(HistoryInfo::NotYetWritten)
}
if rank < chunk.len() {
Expand All @@ -171,7 +170,6 @@ impl<'a, 'b, TX: DbTx<'a>> HistoricalStateProviderRef<'a, 'b, TX> {
Ok(HistoryInfo::MaybeInPlainState)
} else {
// The key has not been written to at all.
error!("lowest_available_block_number.is_none()");
Ok(HistoryInfo::NotYetWritten)
}
}

Check failure on line 175 in crates/storage/provider/src/providers/state/historical.rs

View workflow job for this annotation

GitHub Actions / clippy

this `else { if .. }` block can be collapsed

error: this `else { if .. }` block can be collapsed --> crates/storage/provider/src/providers/state/historical.rs:166:16 | 166 | } else { | ________________^ 167 | | if lowest_available_block_number.is_some() { 168 | | // The key may have been written, but due to pruning we may not have changesets and 169 | | // history, so we need to make a plain state lookup. ... | 174 | | } 175 | | } | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `-D clippy::collapsible-else-if` implied by `-D warnings` help: collapse nested if block | 166 ~ } else if lowest_available_block_number.is_some() { 167 + // The key may have been written, but due to pruning we may not have changesets and 168 + // history, so we need to make a plain state lookup. 169 + Ok(HistoryInfo::MaybeInPlainState) 170 + } else { 171 + // The key has not been written to at all. 172 + Ok(HistoryInfo::NotYetWritten) 173 + } |
Expand Down

0 comments on commit 9121bed

Please sign in to comment.