File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
crates/anvil-polkadot/src/substrate_node/lazy_loading Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -125,9 +125,8 @@ impl<Block: BlockT + DeserializeOwned> Rpc<Block> {
125125
126126 // Use the global RPC runtime to avoid Tokio context conflicts
127127 // The runtime is spawned on a separate thread to completely isolate from the main runtime
128- let ( tx, rx) = std:: sync:: mpsc:: channel ( ) ;
129128 std:: thread:: spawn ( move || {
130- let result = get_rpc_runtime ( ) . block_on ( async move {
129+ get_rpc_runtime ( ) . block_on ( async move {
131130 let start_req = std:: time:: Instant :: now ( ) ;
132131 tracing:: debug!(
133132 target: super :: LAZY_LOADING_LOG_TARGET ,
@@ -151,11 +150,10 @@ impl<Block: BlockT + DeserializeOwned> Rpc<Block> {
151150 ) ;
152151
153152 result
154- } ) ;
155- let _ = tx. send ( result) ;
156- } ) ;
157-
158- rx. recv ( ) . expect ( "RPC thread terminated unexpectedly" )
153+ } )
154+ } )
155+ . join ( )
156+ . expect ( "RPC thread panicked" )
159157 }
160158}
161159
You can’t perform that action at this time.
0 commit comments