Switch to blake2 sum for identifying blocks by their data

This commit is contained in:
Alex Auvolat
2021-03-10 16:33:31 +01:00
parent 2afd2c81ba
commit 0fd7df8fa0
2 changed files with 28 additions and 28 deletions
+1 -1
View File
@@ -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?;