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

Method list_htlcs

cln-grpc/src/server.rs:2392–2422  ·  view source on GitHub ↗
(
        &self,
        request: tonic::Request<pb::ListhtlcsRequest>,
    )

Source from the content-addressed store, hash-verified

2390 }
2391
2392 async fn list_htlcs(
2393 &self,
2394 request: tonic::Request<pb::ListhtlcsRequest>,
2395 ) -> Result<tonic::Response<pb::ListhtlcsResponse>, tonic::Status> {
2396 let req = request.into_inner();
2397 let req: requests::ListhtlcsRequest = req.try_into()?;
2398 debug!("Client asked for list_htlcs");
2399 trace!("list_htlcs request: {:?}", req);
2400 let mut rpc = ClnRpc::new(&self.rpc_path)
2401 .await
2402 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
2403 let result = rpc.call(Request::ListHtlcs(req))
2404 .await
2405 .map_err(|e| Status::new(
2406 Code::Unknown,
2407 format!("Error calling method ListHtlcs: {:?}", e)))?;
2408 match result {
2409 Response::ListHtlcs(r) => {
2410 trace!("list_htlcs response: {:?}", r);
2411 Ok(tonic::Response::new(r.into()))
2412 },
2413 r => Err(Status::new(
2414 Code::Internal,
2415 format!(
2416 "Unexpected result {:?} to method call ListHtlcs",
2417 r
2418 )
2419 )),
2420 }
2421
2422 }
2423
2424 async fn multi_fund_channel(
2425 &self,

Callers

nothing calls this directly

Calls 3

into_innerMethod · 0.80
to_stringMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected