Skip to content

Commit 21a1c57

Browse files
committed
feat(aggregator): wire 'SequentialSignatureProcessor' in serve command
1 parent 0a552fe commit 21a1c57

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

mithril-aggregator/src/commands/serve_command.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,20 @@ impl ServeCommand {
191191
Ok(())
192192
});
193193

194+
let signature_processor = dependencies_builder
195+
.create_signature_processor()
196+
.await
197+
.with_context(|| "Dependencies Builder can not create signature processor")?;
198+
let signature_processor_clone = signature_processor.clone();
199+
join_set.spawn(async move {
200+
signature_processor_clone
201+
.run()
202+
.await
203+
.map_err(|e| e.to_string())?;
204+
205+
Ok(())
206+
});
207+
194208
// Create a SignersImporter only if the `cexplorer_pools_url` is provided in the config.
195209
if let Some(cexplorer_pools_url) = config.cexplorer_pools_url {
196210
match dependencies_builder
@@ -272,6 +286,7 @@ impl ServeCommand {
272286
if !preload_task.is_finished() {
273287
preload_task.abort();
274288
}
289+
signature_processor.stop().await?;
275290

276291
info!(root_logger, "Event store is finishing...");
277292
event_store_thread.await.unwrap();

0 commit comments

Comments
 (0)