Skip to content

Commit

Permalink
minor doc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ChosunOne committed Nov 20, 2019
1 parent 4a42929 commit 970b3b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/hash_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ where
self.tree.remove(root_hash)
}

/// Generates an inclusion proof for the given key at the specified root.
#[inline]
pub fn generate_inclusion_proof(
&self,
Expand All @@ -96,6 +97,7 @@ where
self.tree.generate_inclusion_proof(root, key)
}

/// Verifies an inclusion proof with the given root, key, and value.
#[inline]
pub fn verify_inclusion_proof(
&self,
Expand All @@ -107,6 +109,7 @@ where
self.tree.verify_inclusion_proof(root, key, value, proof)
}

/// Gets a single item out of the tree.
#[inline]
pub fn get_one(
&self,
Expand All @@ -116,6 +119,7 @@ where
self.tree.get_one(root, key)
}

/// Inserts a single item into the tree.
#[inline]
pub fn insert_one(
&mut self,
Expand Down
4 changes: 2 additions & 2 deletions src/tree_db/hashmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ where
fn get_node(&self, key: ArrayType) -> Result<Option<Self::NodeType>, Exception> {
if let Some(m) = self.map.get(&key) {
let node = m.clone();
return Ok(Some(node));
Ok(Some(node))
} else {
return Ok(None);
Ok(None)
}
}

Expand Down

0 comments on commit 970b3b8

Please sign in to comment.