(&self, epoch: u64)
| 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)) |
no outgoing calls
no test coverage detected