MCPcopy Create free account
hub / github.com/ElementsProject/lightning / get_blockheight

Method get_blockheight

plugins/lsps-plugin/src/cln_adapters/rpc.rs:213–221  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

211#[async_trait]
212impl BlockheightProvider for ClnApiRpc {
213 async fn get_blockheight(&self) -> Result<Blockheight> {
214 let mut rpc = self.create_rpc().await?;
215 let info = rpc
216 .call_typed(&GetinfoRequest {})
217 .await
218 .map_err(anyhow::Error::new)
219 .with_context(|| "calling getinfo")?;
220 Ok(info.blockheight)
221 }
222}
223
224#[derive(Debug)]

Callers

nothing calls this directly

Calls 2

call_typedMethod · 0.80
create_rpcMethod · 0.45

Tested by

no test coverage detected