MCPcopy Create free account
hub / github.com/SeismicSystems/summit / EngineClient

Interface EngineClient

types/src/engine_client.rs:33–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31use alloy_transport_ipc::IpcConnect;
32use std::future::Future;
33
34/// The number of times the engine client will try to reconnect
35/// after failing to connect to the IPC socket.
36const IPC_CONNECT_MAX_RETRIES: u32 = 200;
37
38/// Typed error returned by `EngineClient` methods so callers can decide
39/// whether to retry, drop a round, or shut down — instead of the wrapper
40/// panicking on every non-transport JSON-RPC failure.
41///
42/// Transport-level retry already happens inside each engine-client method
43/// via `wait_until_reconnect_available`, so by the time an
44/// `EngineClientError` reaches a caller the call has already been retried
45/// once after reconnect (or the error is JSON-RPC level, which is not
46/// retryable). Callers typically treat any `Err` as a graceful shutdown
47/// signal.
48#[derive(Debug)]
49pub struct EngineClientError(pub TransportError);
50
51impl EngineClientError {
52 /// Construct a custom, non-retryable engine-client error from a message.
53 /// Primarily for tests that simulate an execution-client failure (e.g. a
54 /// failed forkchoice commit at an epoch boundary).
55 pub fn custom(msg: &str) -> Self {
56 EngineClientError(TransportErrorKind::custom_str(msg))
57 }
58}

Callers

nothing calls this directly

Implementers 3

engine_client.rstypes/src/engine_client.rs
mocks.rsfinalizer/src/tests/mocks.rs
mock_engine_client.rsnode/src/test_harness/mock_engine_clie

Calls

no outgoing calls

Tested by

no test coverage detected