lighthouse/beacon_node/src
Mac L 8edd9d45ab Fix purge-db edge case (#2747)
## Issue Addressed

Currently, if you launch the beacon node with the `--purge-db` flag and the `beacon` directory exists, but one (or both) of the `chain_db` or `freezer-db` directories are missing, it will error unnecessarily with: 
```
Failed to remove chain_db: No such file or directory (os error 2)
```

This is an edge case which can occur in cases of manual intervention (a user deleted the directory) or if you had previously run with the `--purge-db` flag and Lighthouse errored before it could initialize the db directories.

## Proposed Changes

Check if the `chain_db`/`freezer_db` exists before attempting to remove them. This prevents unnecessary errors.
2021-10-25 22:11:28 +00:00
..
cli.rs Add flag to disable lock timeouts (#2714) 2021-10-19 00:30:40 +00:00
config.rs Fix purge-db edge case (#2747) 2021-10-25 22:11:28 +00:00
lib.rs Add flag to disable lock timeouts (#2714) 2021-10-19 00:30:40 +00:00