Skip to content

Commit aa97c74

Browse files
committed
add getSlot for healthcheck
1 parent 612056b commit aa97c74

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/api/rpc_server.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ fn build_rpc_module(api_and_indexer: PhotonApi) -> Result<RpcModule<PhotonApi>,
174174
api.get_indexer_slot().await.map_err(Into::into)
175175
})?;
176176

177+
// Alias for getIndexerSlot, to enable compatibility with health check
178+
module.register_async_method("getSlot", |_rpc_params, rpc_context| async move {
179+
let api = rpc_context.as_ref();
180+
api.get_indexer_slot().await.map_err(Into::into)
181+
})?;
182+
177183
module.register_async_method(
178184
"getCompressedAccountsByOwner",
179185
|rpc_params, rpc_context| async move {

0 commit comments

Comments
 (0)