diff --git a/crates/starknet_state_sync/src/runner/mod.rs b/crates/starknet_state_sync/src/runner/mod.rs index d5e8f67149f..7e1f9e7c1a6 100644 --- a/crates/starknet_state_sync/src/runner/mod.rs +++ b/crates/starknet_state_sync/src/runner/mod.rs @@ -31,7 +31,7 @@ impl ComponentStarter for StateSyncRunner { } result = &mut self.p2p_sync_client_future => return result.map_err(|_| ComponentError::InternalComponentError), () = &mut self.p2p_sync_server_future => { - return Err(ComponentError::InternalComponentError); + return Ok(()); } } } diff --git a/crates/starknet_state_sync/src/runner/test.rs b/crates/starknet_state_sync/src/runner/test.rs index f1ba2e47d98..bc044fa5503 100644 --- a/crates/starknet_state_sync/src/runner/test.rs +++ b/crates/starknet_state_sync/src/runner/test.rs @@ -27,13 +27,13 @@ fn run_returns_when_sync_client_future_returns() { } #[test] -fn run_returns_error_when_sync_server_future_returns() { +fn run_returns_when_sync_server_future_returns() { let network_future = pending().boxed(); let p2p_sync_client_future = pending().boxed(); let p2p_sync_server_future = ready(()).boxed(); let mut state_sync_runner = StateSyncRunner { network_future, p2p_sync_client_future, p2p_sync_server_future }; - state_sync_runner.start().now_or_never().unwrap().unwrap_err(); + state_sync_runner.start().now_or_never().unwrap().unwrap(); } #[test]