aboutsummaryrefslogtreecommitdiff
path: root/src/model/block.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-10 16:33:31 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-10 16:33:31 +0100
commit0fd7df8fa0741caa622b2bae979aac867f443154 (patch)
tree661429b0ed0f8816b3f80a04f5548d6f13da46d1 /src/model/block.rs
parent2afd2c81baacf66f00333de3f0fb18df0b497b41 (diff)
downloadgarage-0fd7df8fa0741caa622b2bae979aac867f443154.tar.gz
garage-0fd7df8fa0741caa622b2bae979aac867f443154.zip
Switch to blake2 sum for identifying blocks by their data
Diffstat (limited to 'src/model/block.rs')
-rw-r--r--src/model/block.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/model/block.rs b/src/model/block.rs
index d3957403..57f4c077 100644
--- a/src/model/block.rs
+++ b/src/model/block.rs
@@ -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?;