Skip to content

Commit

Permalink
require chunk data pack data exists when opening the pebble db
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchiqing committed Dec 12, 2024
1 parent 52f2397 commit a2440d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engine/verification/verifier/verifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ func initStorages(chainID flow.ChainID, dataDir string, chunkDataPackDir string)
return nil, nil, nil, nil, nil, fmt.Errorf("could not init protocol state: %w", err)
}

chunkDataPackDB, err := storagepebble.OpenDefaultPebbleDB(chunkDataPackDir)
// require the chunk data pack data must exist before returning the storage module
chunkDataPackDB, err := storagepebble.MustOpenDefaultPebbleDB(chunkDataPackDir)
if err != nil {
return nil, nil, nil, nil, nil, fmt.Errorf("could not open chunk data pack DB: %w", err)
}
Expand Down

0 comments on commit a2440d3

Please sign in to comment.