aboutsummaryrefslogtreecommitdiff
path: root/src/table/merkle.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-16 15:58:40 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-16 15:58:40 +0100
commitf4346cc5f45839ace93d2d11ce6beea632fd8f2c (patch)
tree61d33a0c30faa972a81519c09dd94b34282658e5 /src/table/merkle.rs
parent2a41b8238496dfeac5ee0f273445299cbd112ff6 (diff)
downloadgarage-f4346cc5f45839ace93d2d11ce6beea632fd8f2c.tar.gz
garage-f4346cc5f45839ace93d2d11ce6beea632fd8f2c.zip
Update dependencies
Diffstat (limited to 'src/table/merkle.rs')
-rw-r--r--src/table/merkle.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/table/merkle.rs b/src/table/merkle.rs
index db05cca4..8a8eb342 100644
--- a/src/table/merkle.rs
+++ b/src/table/merkle.rs
@@ -20,7 +20,6 @@ use crate::data::*;
use crate::replication::*;
use crate::schema::*;
-
// This modules partitions the data in 2**16 partitions, based on the top
// 16 bits (two bytes) of item's partition keys' hashes.
// It builds one Merkle tree for each of these 2**16 partitions.
@@ -73,10 +72,7 @@ where
F: TableSchema + 'static,
R: TableReplication + 'static,
{
- pub(crate) fn launch(
- background: &BackgroundRunner,
- data: Arc<TableData<F, R>>,
- ) -> Arc<Self> {
+ pub(crate) fn launch(background: &BackgroundRunner, data: Arc<TableData<F, R>>) -> Arc<Self> {
let empty_node_hash = blake2sum(&rmp_to_vec_all_named(&MerkleNode::Empty).unwrap()[..]);
let ret = Arc::new(Self {
@@ -132,7 +128,10 @@ where
};
let key = MerkleNodeKey {
- partition: self.data.replication.partition_of(&Hash::try_from(&k[0..32]).unwrap()),
+ partition: self
+ .data
+ .replication
+ .partition_of(&Hash::try_from(&k[0..32]).unwrap()),
prefix: vec![],
};
self.data