File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
stackslib/src/clarity_vm/database Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -324,10 +324,21 @@ impl ClarityBackingStore for MemoryBackingStore {
324
324
SqliteConnection :: get ( self . get_side_store ( ) , key)
325
325
}
326
326
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
+
327
331
fn get_data_with_proof ( & mut self , key : & str ) -> Result < Option < ( String , Vec < u8 > ) > > {
328
332
Ok ( SqliteConnection :: get ( self . get_side_store ( ) , key) ?. map ( |x| ( x, vec ! [ ] ) ) )
329
333
}
330
334
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
+
331
342
fn get_side_store ( & mut self ) -> & Connection {
332
343
& self . side_store
333
344
}
Original file line number Diff line number Diff line change @@ -1232,10 +1232,24 @@ impl ClarityBackingStore for MemoryBackingStore {
1232
1232
SqliteConnection :: get ( self . get_side_store ( ) , key)
1233
1233
}
1234
1234
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
+
1235
1239
fn get_data_with_proof ( & mut self , key : & str ) -> InterpreterResult < Option < ( String , Vec < u8 > ) > > {
1236
1240
Ok ( SqliteConnection :: get ( self . get_side_store ( ) , key) ?. map ( |x| ( x, vec ! [ ] ) ) )
1237
1241
}
1238
1242
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
+
1239
1253
fn get_side_store ( & mut self ) -> & Connection {
1240
1254
& self . side_store
1241
1255
}
You can’t perform that action at this time.
0 commit comments