diff --git a/crates/apollo_committer/src/committer.rs b/crates/apollo_committer/src/committer.rs index 57ea65f84cf..b0afde5fba5 100644 --- a/crates/apollo_committer/src/committer.rs +++ b/crates/apollo_committer/src/committer.rs @@ -155,7 +155,7 @@ where impl Committer where S: StorageConstructor, - ForestDB: ForestStorageWithEmptyReadContext, + ForestDB: ForestStorageWithEmptyReadContext + ForestWriterWithMetadataAndWitnesses, { pub async fn new(config: CommitterConfig) -> Self { let storage = S::create_storage(config.db_path.clone(), config.storage_config.clone()); @@ -382,10 +382,25 @@ where to {last_committed_block}" ); block_measurements.start_measurement(Action::Write); - let n_write_entries = self - .forest_storage + let n_write_entries = { + #[cfg(not(feature = "os_input"))] + { + self.forest_storage .write_with_metadata(&filled_forest, metadata, deleted_nodes) .await + } + #[cfg(feature = "os_input")] + { + self.forest_storage + .write_with_metadata_and_witnesses( + &filled_forest, + metadata, + deleted_nodes, + PatriciaProofsUpdates::Delete(height), + ) + .await + } + } .map_err(|err| self.map_internal_error(err))?; block_measurements.attempt_to_stop_measurement(Action::Write, n_write_entries).ok(); block_measurements.attempt_to_stop_measurement(Action::EndToEnd, 0).ok();