lighthouse/beacon_node
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
..
beacon_chain Add flag to disable lock timeouts (#2714) 2021-10-19 00:30:40 +00:00
client Rename eth2_libp2p to lighthouse_network (#2702) 2021-10-19 00:30:39 +00:00
eth1 Remove unused deps (#2592) 2021-09-30 04:31:42 +00:00
genesis Remove unused deps (#2592) 2021-09-30 04:31:42 +00:00
http_api Rename eth2_libp2p to lighthouse_network (#2702) 2021-10-19 00:30:39 +00:00
http_metrics Rename eth2_libp2p to lighthouse_network (#2702) 2021-10-19 00:30:39 +00:00
lighthouse_network Add a waker to the RPC handler (#2721) 2021-10-21 06:14:36 +00:00
network Update next_fork_subscriptions correctly (#2688) 2021-10-21 04:38:44 +00:00
operation_pool Add Altair tests to op pool (#2723) 2021-10-16 05:07:23 +00:00
src Fix purge-db edge case (#2747) 2021-10-25 22:11:28 +00:00
store Resolve Rust 1.56 lints and warnings (#2728) 2021-10-19 00:30:42 +00:00
tests Altair consensus changes and refactors (#2279) 2021-07-09 06:15:32 +00:00
timer Remove unused deps (#2592) 2021-09-30 04:31:42 +00:00
websocket_server Server sent events (#1920) 2020-12-04 00:18:58 +00:00
Cargo.toml Rename eth2_libp2p to lighthouse_network (#2702) 2021-10-19 00:30:39 +00:00