Skip to content

Commit

Permalink
panic on not found
Browse files Browse the repository at this point in the history
  • Loading branch information
calbera committed Aug 14, 2024
1 parent f537a1a commit d3fe4e6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mod/storage/pkg/block/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,12 @@ func (kv *KVStore[BeaconBlockT]) Prune(start, end uint64) error {

blk, err := kv.blocks.Get(ctx, kv.nextToPrune)
if err != nil {
panic(err)
if !errors.Is(err, sdkcollections.ErrNotFound) {
panic(err)
}
} else {
fmt.Println("blk", blk)
}
fmt.Println("blk", blk)

if err := kv.blocks.Remove(ctx, kv.nextToPrune); err != nil {
// This can error for 2 reasons:
Expand Down

0 comments on commit d3fe4e6

Please sign in to comment.