diff --git a/chain/src/txhashset/txhashset.rs b/chain/src/txhashset/txhashset.rs index 0ed33e087..45ee95cc7 100644 --- a/chain/src/txhashset/txhashset.rs +++ b/chain/src/txhashset/txhashset.rs @@ -1451,7 +1451,7 @@ fn check_and_remove_files(txhashset_path: &PathBuf, header: &BlockHeader) -> Res } // Then compare the files found in the subdirectories - let pmmr_files_expected: HashSet<_> = PMMR_FILES + let mut pmmr_files_expected: HashSet<_> = PMMR_FILES .iter() .cloned() .map(|s| { @@ -1462,6 +1462,8 @@ fn check_and_remove_files(txhashset_path: &PathBuf, header: &BlockHeader) -> Res } }) .collect(); + // prevent checker from deleting 3 dot file, could be removed after mainnet + pmmr_files_expected.insert(format!("pmmr_leaf.bin.{}...", header.hash())); let subdirectories = fs::read_dir(txhashset_path)?; for subdirectory in subdirectories { diff --git a/store/src/pmmr.rs b/store/src/pmmr.rs index 2148ff681..d22f435cc 100644 --- a/store/src/pmmr.rs +++ b/store/src/pmmr.rs @@ -194,8 +194,8 @@ impl PMMRBackend { header.hash() ); // Check for a ... (3 dot) ending version of the file - could probably be removed after mainnet - let compaitble_snapshot_path = PathBuf::from(leaf_snapshot_path.clone() + "..."); - if compaitble_snapshot_path.exists() { + let compatible_snapshot_path = PathBuf::from(leaf_snapshot_path.clone() + "..."); + if compatible_snapshot_path.exists() { LeafSet::copy_snapshot(&leaf_set_path, &compaitble_snapshot_path)?; } else { LeafSet::copy_snapshot(&leaf_set_path, &PathBuf::from(leaf_snapshot_path))?;