(&self)
| 220 | #[async_trait] |
| 221 | impl BlockheightProvider for ClnApiRpc { |
| 222 | async fn get_blockheight(&self) -> AnyResult<Blockheight> { |
| 223 | let mut rpc = self.create_rpc().await?; |
| 224 | let info = rpc |
| 225 | .call_typed(&GetinfoRequest {}) |
| 226 | .await |
| 227 | .map_err(anyhow::Error::new) |
| 228 | .with_context(|| "calling getinfo")?; |
| 229 | Ok(info.blockheight) |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | #[async_trait] |
no test coverage detected