aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-02-21 15:24:30 +0100
committerAlex Auvolat <alex@adnab.me>2021-02-21 15:24:30 +0100
commitb1b640ae8bd8d2ed7c128cb3f90e3e56226a5560 (patch)
tree55a703af2b8816b5c2e1aeb635db3538daa96a75 /src/model
parente59322041a0f894db0dfbd32805303b64048c810 (diff)
downloadgarage-b1b640ae8bd8d2ed7c128cb3f90e3e56226a5560.tar.gz
garage-b1b640ae8bd8d2ed7c128cb3f90e3e56226a5560.zip
rename hash() to sha256sum(), we might want to change it at some places
Diffstat (limited to 'src/model')
-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 8a513a3c..1627ef85 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::hash(&data[..]) != *hash {
+ if data::sha256sum(&data[..]) != *hash {
let _lock = self.data_dir_lock.lock().await;
warn!("Block {:?} is corrupted. Deleting and resyncing.", hash);
fs::remove_file(path).await?;