(not well tested) use merkle tree for sync

This commit is contained in:
Alex Auvolat
2021-03-11 18:28:03 +01:00
parent 94f3d28774
commit 046b649bcc
11 changed files with 765 additions and 985 deletions
-1
View File
@@ -53,7 +53,6 @@ impl TableReplication for TableFullReplication {
fn split_points(&self, _ring: &Ring) -> Vec<Hash> {
let mut ret = vec![];
ret.push([0u8; 32].into());
ret.push([0xFFu8; 32].into());
ret
}
}
+4 -2
View File
@@ -44,11 +44,13 @@ impl TableReplication for TableShardedReplication {
fn split_points(&self, ring: &Ring) -> Vec<Hash> {
let mut ret = vec![];
ret.push([0u8; 32].into());
for entry in ring.ring.iter() {
ret.push(entry.location);
}
ret.push([0xFFu8; 32].into());
if ret.len() > 0 {
assert_eq!(ret[0], [0u8; 32].into());
}
ret
}
}