Skip to content

Commit

Permalink
Create validator dir if missing when moving slashing protection inter…
Browse files Browse the repository at this point in the history
…change files. #22
  • Loading branch information
Tumas committed Apr 24, 2024
1 parent 1c0f078 commit 81065f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions slashing_protection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,7 @@ fn move_interchange_backup_files_to_validator_dir(
let validator_backup_path = validator_directory.as_ref().join(file_name);

if !validator_backup_path.try_exists()? {
fs_err::create_dir_all(validator_directory.as_ref())?;
fs_err::copy(&beacon_backup_path, &validator_backup_path)?;
fs_err::remove_file(&beacon_backup_path)?;

Expand Down

0 comments on commit 81065f1

Please sign in to comment.