1#[derive(Debug, thiserror::Error)]
2pub enum BlkReaderError {
3 #[error("Failed to open LevelDB at {path}: {reason}")]
4 LevelDbOpen { path: std::path::PathBuf, reason: String },
5
6 #[error("Error parsing index entry: {reason}")]
7 IndexParseError { reason: String },
8
9 #[error("File blk{index:05}.dat not found")]
10 BlkFileNotFound { index: u32 },
11
12 #[error("Invalid magic bytes in file {file}, offset {offset}: expected 0xD9B4BEF9, got {got:#010x}")]
13 InvalidMagicBytes { file: u32, offset: u64, got: u32 },
14
15 #[error("I/O error: {0}")]
16 Io(#[from] std::io::Error),
17}