Remove unnecessary RPC boxing (#11434)

This commit is contained in:
Nazar Mokrynskyi
2022-05-17 23:12:59 +03:00
committed by GitHub
parent 8bce841d70
commit 558daec697
5 changed files with 12 additions and 23 deletions
+2 -4
View File
@@ -210,10 +210,8 @@ where
};
sink.pipe_from_stream(stream).await;
}
.boxed();
};
self.executor
.spawn("substrate-rpc-subscription", Some("rpc"), fut.map(drop).boxed());
self.executor.spawn("substrate-rpc-subscription", Some("rpc"), fut.boxed());
}
}
+2 -3
View File
@@ -147,8 +147,7 @@ fn subscribe_headers<Block, Client, F, G, S>(
if let Some(mut sink) = pending.accept() {
sink.pipe_from_stream(stream).await;
}
}
.boxed();
};
executor.spawn("substrate-rpc-subscription", Some("rpc"), fut.map(drop).boxed());
executor.spawn("substrate-rpc-subscription", Some("rpc"), fut.boxed());
}
+4 -8
View File
@@ -404,11 +404,9 @@ where
if let Some(mut sink) = pending.accept() {
sink.pipe_from_stream(stream).await;
}
}
.boxed();
};
self.executor
.spawn("substrate-rpc-subscription", Some("rpc"), fut.map(drop).boxed());
self.executor.spawn("substrate-rpc-subscription", Some("rpc"), fut.boxed());
}
fn subscribe_storage(&self, pending: PendingSubscription, keys: Option<Vec<StorageKey>>) {
@@ -451,11 +449,9 @@ where
if let Some(mut sink) = pending.accept() {
sink.pipe_from_stream(stream).await;
}
}
.boxed();
};
self.executor
.spawn("substrate-rpc-subscription", Some("rpc"), fut.map(drop).boxed());
self.executor.spawn("substrate-rpc-subscription", Some("rpc"), fut.boxed());
}
async fn trace_block(