Skip to content

Commit ce0211d

Browse files
authored
make get_elem public (#14)
1 parent ec1d06c commit ce0211d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/tree.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const DEFAULT_TREE_DEPTH: usize = 20;
1616
// Denotes keys (depth, index) in Merkle Tree. Can be converted to DBKey
1717
// TODO! Think about using hashing for that
1818
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
19-
struct Key(usize, usize);
19+
pub struct Key(usize, usize);
2020
impl From<Key> for DBKey {
2121
fn from(key: Key) -> Self {
2222
let cantor_pairing = ((key.0 + key.1) * (key.0 + key.1 + 1) / 2 + key.1) as u64;
@@ -180,7 +180,7 @@ where
180180
}
181181

182182
// Returns elem by the key
183-
fn get_elem(&self, key: Key) -> PmtreeResult<H::Fr> {
183+
pub fn get_elem(&self, key: Key) -> PmtreeResult<H::Fr> {
184184
let res = self
185185
.db
186186
.get(key.into())?

0 commit comments

Comments
 (0)