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

Method get_finalized_header

rpc/src/server.rs:141–156  ·  view source on GitHub ↗
(&self, epoch: u64)

Source from the content-addressed store, hash-verified

139 }
140
141 async fn get_public_keys(&self) -> RpcResult<PublicKeysResponse> {
142 // An observer's live P2P identity is the derived child key and it
143 // never acts as a consensus participant; report that key with no
144 // consensus key rather than the validator master identity.
145 if let Some(observer_node_key) = &self.observer_node_key {
146 return Ok(PublicKeysResponse {
147 node: observer_node_key.clone(),
148 consensus: String::new(),
149 });
150 }
151
152 let key_paths = KeyPaths::new(self.key_store_path.clone());
153
154 let node = key_paths.node_public_key().map_err(|e| {
155 RpcError::KeyStoreError(format!("Failed to read node public key: {}", e))
156 })?;
157
158 let consensus = key_paths.consensus_public_key().map_err(|e| {
159 RpcError::KeyStoreError(format!("Failed to read consensus public key: {}", e))

Callers 2

get_checkpointMethod · 0.45
get_latest_checkpointMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected