Change SpawnedSubsystem type to log subsystem errors (#1878)

* Change SpawnedSubsystem type to log subsystem errors

* Remove clone
This commit is contained in:
Fedor Sakharov
2020-10-28 22:57:06 +03:00
committed by GitHub
parent 8a305ac963
commit 935fcd1666
16 changed files with 42 additions and 27 deletions
@@ -165,7 +165,10 @@ where
Context: SubsystemContext<Message = CollationGenerationMessage>,
{
fn start(self, ctx: Context) -> SpawnedSubsystem {
let future = Box::pin(self.run(ctx));
let future = Box::pin(async move {
self.run(ctx).await;
Ok(())
});
SpawnedSubsystem {
name: "collation-generation-subsystem",