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

Method get_blockheight

plugins/lsps-plugin/src/core/lsps2/handler.rs:222–230  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

220#[async_trait]
221impl 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]

Callers 1

handle_buyMethod · 0.45

Calls 3

call_typedMethod · 0.80
create_rpcMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected