Skip to content
Snippets Groups Projects
Commit 558daec6 authored by Nazar Mokrynskyi's avatar Nazar Mokrynskyi Committed by GitHub
Browse files

Remove unnecessary RPC boxing (#11434)

parent 8bce841d
No related merge requests found
......@@ -146,11 +146,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 latest_finalized(&self) -> RpcResult<Block::Hash> {
......
......@@ -113,11 +113,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 prove_finality(
......
......@@ -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());
}
}
......@@ -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());
}
......@@ -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(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment