mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-09 06:09:23 +00:00
Switch to blake2 sum for identifying blocks by their data
This commit is contained in:
+1
-1
@@ -176,7 +176,7 @@ impl BlockManager {
|
||||
f.read_to_end(&mut data).await?;
|
||||
drop(f);
|
||||
|
||||
if data::sha256sum(&data[..]) != *hash {
|
||||
if data::blake2sum(&data[..]) != *hash {
|
||||
let _lock = self.data_dir_lock.lock().await;
|
||||
warn!("Block {:?} is corrupted. Deleting and resyncing.", hash);
|
||||
fs::remove_file(path).await?;
|
||||
|
||||
Reference in New Issue
Block a user