diff --git a/core/src/replay_stage.rs b/core/src/replay_stage.rs index bbdc03e14d..6428ec0a51 100644 --- a/core/src/replay_stage.rs +++ b/core/src/replay_stage.rs @@ -12,6 +12,7 @@ use crate::{ }; use solana_ledger::{ bank_forks::BankForks, + block_error::BlockError, blockstore::Blockstore, blockstore_processor::{ self, BlockstoreProcessorError, ConfirmationProgress, ConfirmationTiming, @@ -629,14 +630,17 @@ impl ReplayStage { // errors related to the slot being purged let slot = bank.slot(); warn!("Fatal replay error in slot: {}, err: {:?}", slot, err); - if err.is_severity_error() { - datapoint_error!( + if matches!( + err, + BlockstoreProcessorError::InvalidBlock(BlockError::InvalidTickCount) + ) { + datapoint_info!( "replay-stage-mark_dead_slot", ("error", format!("error: {:?}", err), String), ("slot", slot, i64) ); } else { - datapoint_info!( + datapoint_error!( "replay-stage-mark_dead_slot", ("error", format!("error: {:?}", err), String), ("slot", slot, i64) @@ -1296,7 +1300,6 @@ pub(crate) mod tests { use crossbeam_channel::unbounded; use solana_client::rpc_response::{RpcEncodedTransaction, RpcTransactionWithStatusMeta}; use solana_ledger::{ - block_error::BlockError, blockstore::make_slot_entries, blockstore::{entries_to_test_shreds, BlockstoreError}, create_new_tmp_ledger, diff --git a/ledger/src/blockstore_processor.rs b/ledger/src/blockstore_processor.rs index 749d864a1e..9d8571bf11 100644 --- a/ledger/src/blockstore_processor.rs +++ b/ledger/src/blockstore_processor.rs @@ -260,15 +260,6 @@ pub enum BlockstoreProcessorError { InvalidHardFork(Slot), } -impl BlockstoreProcessorError { - pub fn is_severity_error(&self) -> bool { - !matches!( - self, - BlockstoreProcessorError::InvalidBlock(BlockError::InvalidTickCount) - ) - } -} - /// Callback for accessing bank state while processing the blockstore pub type ProcessCallback = Arc () + Sync + Send>;