Skip to content

Commit

Permalink
stops recovering legacy shreds
Browse files Browse the repository at this point in the history
  • Loading branch information
behzadnouri committed Jan 16, 2025
1 parent 950d496 commit 288bfc8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ledger/src/shred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,7 @@ impl TryFrom<u8> for ShredVariant {
}
}

#[allow(unreachable_code)]
pub(crate) fn recover(
shreds: Vec<Shred>,
reed_solomon_cache: &ReedSolomonCache,
Expand All @@ -1118,6 +1119,7 @@ pub(crate) fn recover(
.shred_variant
{
ShredVariant::LegacyData | ShredVariant::LegacyCode => {
panic!("Legacy Shred!");
let mut shreds = Shredder::try_recovery(shreds, reed_solomon_cache)?;
shreds.retain(|shred| {
get_slot_leader(shred.slot())
Expand Down

0 comments on commit 288bfc8

Please sign in to comment.