Skip to content

Commit

Permalink
Remove blobs_db when purge-db (sigp#5081)
Browse files Browse the repository at this point in the history
  • Loading branch information
macladson authored Jan 18, 2024
1 parent a0b407c commit 47b28c4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions beacon_node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ pub fn get_config<E: EthSpec>(
fs::remove_dir_all(freezer_db)
.map_err(|err| format!("Failed to remove freezer_db: {}", err))?;
}

// Remove the blobs db.
let blobs_db = client_config.get_blobs_db_path();
if blobs_db.exists() {
fs::remove_dir_all(blobs_db)
.map_err(|err| format!("Failed to remove blobs_db: {}", err))?;
}
}

// Create `datadir` and any non-existing parent directories.
Expand Down

0 comments on commit 47b28c4

Please sign in to comment.