Trait diem_jellyfish_merkle::TreeReader[][src]

pub trait TreeReader<V> {
    fn get_node_option(&self, node_key: &NodeKey) -> Result<Option<Node<V>>>;
fn get_rightmost_leaf(&self) -> Result<Option<(NodeKey, LeafNode<V>)>>; fn get_node(&self, node_key: &NodeKey) -> Result<Node<V>> { ... } }
Expand description

TreeReader defines the interface between JellyfishMerkleTree and underlying storage holding nodes.

Required methods

Gets node given a node key. Returns None if the node does not exist.

Gets the rightmost leaf. Note that this assumes we are in the process of restoring the tree and all nodes are at the same version.

Provided methods

Gets node given a node key. Returns error if the node does not exist.

Implementors