From 9abf59458f1c1a3adca366a3ec34ef91e845ee09 Mon Sep 17 00:00:00 2001 From: Kariy Date: Thu, 18 Jan 2024 21:30:01 +0900 Subject: [PATCH] update --- crates/katana/rpc/src/starknet.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/crates/katana/rpc/src/starknet.rs b/crates/katana/rpc/src/starknet.rs index 42e6f9984c..6c2f9e82bd 100644 --- a/crates/katana/rpc/src/starknet.rs +++ b/crates/katana/rpc/src/starknet.rs @@ -66,16 +66,7 @@ impl StarknetApi { T: Send + 'static, { let this = self.clone(); - // create oneshot tokio channel - let (sender, receiver) = tokio::sync::oneshot::channel::(); - let _ = TokioTaskSpawner::new() - .unwrap() - .spawn_blocking(move || { - let res = func(this); - let _ = sender.send(res); - }) - .await; - receiver.await.unwrap() + TokioTaskSpawner::new().unwrap().spawn_blocking(move || func(this)).await.unwrap() } } #[async_trait]