Remove blobs_db when purge-db (#5081)

This commit is contained in:
Mac L 2024-01-19 07:59:08 +11:00 committed by GitHub
parent a0b407c15d
commit 47b28c4935
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.