Skip to content

Commit

Permalink
chore: add missing functions to ClarityBackingStore trait
Browse files Browse the repository at this point in the history
  • Loading branch information
csgui committed Nov 27, 2024
1 parent f7c2ca7 commit def1ee7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clarity/src/vm/database/clarity_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,15 @@ pub trait ClarityBackingStore {
fn put_all_data(&mut self, items: Vec<(String, String)>) -> Result<()>;
/// fetch K-V out of the committed datastore
fn get_data(&mut self, key: &str) -> Result<Option<String>>;
/// fetch Hash(K)-V out of the commmitted datastore
fn get_data_from_path(&mut self, hash: &TrieHash) -> Result<Option<String>>;
/// fetch K-V out of the committed datastore, along with the byte representation
/// of the Merkle proof for that key-value pair
fn get_data_with_proof(&mut self, key: &str) -> Result<Option<(String, Vec<u8>)>>;
fn get_data_with_proof_from_path(
&mut self,
hash: &TrieHash,
) -> Result<Option<(String, Vec<u8>)>>;
fn has_entry(&mut self, key: &str) -> Result<bool> {
Ok(self.get_data(key)?.is_some())
}
Expand Down

0 comments on commit def1ee7

Please sign in to comment.