Skip to content

Commit 5b3ac9d

Browse files
committed
chore: add missing trait functions implementations
1 parent ef3ef67 commit 5b3ac9d

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

clarity/src/vm/database/sqlite.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,21 @@ impl ClarityBackingStore for MemoryBackingStore {
324324
SqliteConnection::get(self.get_side_store(), key)
325325
}
326326

327+
fn get_data_from_path(&mut self, hash: &TrieHash) -> Result<Option<String>> {
328+
SqliteConnection::get(self.get_side_store(), hash.to_string().as_str())
329+
}
330+
327331
fn get_data_with_proof(&mut self, key: &str) -> Result<Option<(String, Vec<u8>)>> {
328332
Ok(SqliteConnection::get(self.get_side_store(), key)?.map(|x| (x, vec![])))
329333
}
330334

335+
fn get_data_with_proof_from_path(
336+
&mut self,
337+
hash: &TrieHash,
338+
) -> Result<Option<(String, Vec<u8>)>> {
339+
self.get_data_with_proof(&hash.to_string())
340+
}
341+
331342
fn get_side_store(&mut self) -> &Connection {
332343
&self.side_store
333344
}

stackslib/src/clarity_vm/database/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,10 +1232,24 @@ impl ClarityBackingStore for MemoryBackingStore {
12321232
SqliteConnection::get(self.get_side_store(), key)
12331233
}
12341234

1235+
fn get_data_from_path(&mut self, hash: &TrieHash) -> InterpreterResult<Option<String>> {
1236+
SqliteConnection::get(self.get_side_store(), hash.to_string().as_str())
1237+
}
1238+
12351239
fn get_data_with_proof(&mut self, key: &str) -> InterpreterResult<Option<(String, Vec<u8>)>> {
12361240
Ok(SqliteConnection::get(self.get_side_store(), key)?.map(|x| (x, vec![])))
12371241
}
12381242

1243+
fn get_data_with_proof_from_path(
1244+
&mut self,
1245+
key: &TrieHash,
1246+
) -> InterpreterResult<Option<(String, Vec<u8>)>> {
1247+
Ok(
1248+
SqliteConnection::get(self.get_side_store(), key.to_string().as_str())?
1249+
.map(|x| (x, vec![])),
1250+
)
1251+
}
1252+
12391253
fn get_side_store(&mut self) -> &Connection {
12401254
&self.side_store
12411255
}

0 commit comments

Comments
 (0)