File tree Expand file tree Collapse file tree
crates/apollo_committer/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ where
158158impl < S , ForestDB > Committer < S , ForestDB >
159159where
160160 S : StorageConstructor ,
161- ForestDB : ForestStorageWithEmptyReadContext < Storage = S > ,
161+ ForestDB : ForestStorageWithEmptyReadContext < Storage = S > + ForestWriterWithMetadataAndWitnesses ,
162162{
163163 pub async fn new ( config : CommitterConfig < S :: Config > ) -> Self {
164164 let storage = S :: create_storage ( config. db_path . clone ( ) , config. storage_config . clone ( ) ) ;
@@ -392,10 +392,25 @@ where
392392 to {last_committed_block}"
393393 ) ;
394394 block_measurements. start_measurement ( Action :: Write ) ;
395- let n_write_entries = self
396- . forest_storage
395+ let n_write_entries = {
396+ #[ cfg( not( feature = "os_input" ) ) ]
397+ {
398+ self . forest_storage
397399 . write_with_metadata ( & filled_forest, metadata, deleted_nodes)
398400 . await
401+ }
402+ #[ cfg( feature = "os_input" ) ]
403+ {
404+ self . forest_storage
405+ . write_with_metadata_and_witnesses (
406+ & filled_forest,
407+ metadata,
408+ deleted_nodes,
409+ PatriciaProofsUpdates :: Delete ( height) ,
410+ )
411+ . await
412+ }
413+ }
399414 . map_err ( |err| self . map_internal_error ( err) ) ?;
400415 block_measurements. attempt_to_stop_measurement ( Action :: Write , n_write_entries) . ok ( ) ;
401416 block_measurements. attempt_to_stop_measurement ( Action :: EndToEnd , 0 ) . ok ( ) ;
You can’t perform that action at this time.
0 commit comments