Skip to content

Commit

Permalink
Make merkle::get_iter crate-only public
Browse files Browse the repository at this point in the history
Also removed incorrect comment and comment about DiskAddress::is_null
  • Loading branch information
rkuris committed Nov 15, 2023
1 parent 55bc47a commit 133f949
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion firewood/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ impl<S: ShaleStore<Node> + Send + Sync> DbRev<S> {
&self,
start_key: Option<K>,
) -> Result<merkle::MerkleKeyValueStream<'_, S>, api::Error> {
// TODO: get first key when start_key is None
self.merkle
.get_iter(start_key, self.header.kv_root)
.map_err(|e| api::Error::InternalError(e.into()))
Expand Down
3 changes: 1 addition & 2 deletions firewood/src/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1179,12 +1179,11 @@ impl<S: ShaleStore<Node> + Send + Sync> Merkle<S> {
self.store.flush_dirty()
}

pub fn get_iter<K: AsRef<[u8]>>(
pub(crate) fn get_iter<K: AsRef<[u8]>>(
&self,
key: Option<K>,
root: DiskAddress,
) -> Result<MerkleKeyValueStream<'_, S>, MerkleError> {
// TODO: if DiskAddress::is_null() ...
Ok(MerkleKeyValueStream {
key_state: IteratorState::new(key),
merkle_root: root,
Expand Down

0 comments on commit 133f949

Please sign in to comment.