Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
pr feedback: panic immediately if run_purge fails
Browse files Browse the repository at this point in the history
  • Loading branch information
AshwinSekar committed Feb 7, 2024
1 parent ba6057b commit 6290f67
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ledger/src/blockstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,8 @@ impl Blockstore {
.expect("Couldn't fetch from SlotMeta column family")
{
// Clear all slot related information
let run_purge_result = self.run_purge(slot, slot, PurgeType::Exact);
self.run_purge(slot, slot, PurgeType::Exact)
.expect("Purge database operations failed");

// Clear this slot as a next slot from parent
let parent_purge_result = if let Some(parent_slot) = slot_meta.parent_slot {
Expand All @@ -1212,10 +1213,6 @@ impl Blockstore {
"Couldn't reinsert `next_slots` after purging.
Blockstore might be in an inconsistent state requiring manual intervention",
);
run_purge_result.expect(
"Purge database operations failed.
Blockstore might be in an inconsistent state requiring manual intervention",
);
parent_purge_result.expect(
"Clearing parent next slot failed.
Blockstore might be in an inconsistent state requiring manual intervention",
Expand Down

0 comments on commit 6290f67

Please sign in to comment.