aboutsummaryrefslogtreecommitdiff
path: root/src/table/table_sync.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-02-23 18:14:37 +0100
committerAlex Auvolat <alex@adnab.me>2021-02-23 18:14:37 +0100
commit6e6f7e8555ad488a8b4d67ba640ddad933aa2654 (patch)
treee389f2238c0516c01a1b468e4b1c884176680d40 /src/table/table_sync.rs
parente8e4418ca7c0b1156d5bc103b164aa72ecb748b9 (diff)
downloadgarage-6e6f7e8555ad488a8b4d67ba640ddad933aa2654.tar.gz
garage-6e6f7e8555ad488a8b4d67ba640ddad933aa2654.zip
Replace some checksums where it makes sense
Diffstat (limited to 'src/table/table_sync.rs')
-rw-r--r--src/table/table_sync.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/table/table_sync.rs b/src/table/table_sync.rs
index 86878e35..073540d4 100644
--- a/src/table/table_sync.rs
+++ b/src/table/table_sync.rs
@@ -322,7 +322,7 @@ where
.range(range.begin.clone()..range.end.clone())
{
let (key, value) = item?;
- let key_hash = sha256sum(&key[..]);
+ let key_hash = blake2sum(&key[..]);
if children.len() > 0
&& key_hash.as_slice()[0..range.level]
.iter()
@@ -340,7 +340,7 @@ where
end: vec![],
level: 0,
};
- children.push((item_range, sha256sum(&value[..])));
+ children.push((item_range, blake2sum(&value[..])));
}
Ok(RangeChecksum {
bounds: range.clone(),
@@ -378,7 +378,7 @@ where
}
let found_limit = sub_ck.found_limit.unwrap();
- let actual_limit_hash = sha256sum(&found_limit[..]);
+ let actual_limit_hash = blake2sum(&found_limit[..]);
if actual_limit_hash.as_slice()[0..range.level]
.iter()
.all(|x| *x == 0u8)
@@ -426,7 +426,7 @@ where
);
let hash = if v.children.len() > 0 {
- Some(sha256sum(&rmp_to_vec_all_named(&v)?[..]))
+ Some(blake2sum(&rmp_to_vec_all_named(&v)?[..]))
} else {
None
};