From 6b841791890d8039e6d5d6219f26bf9fb88a1d87 Mon Sep 17 00:00:00 2001 From: Asone Date: Fri, 3 Jun 2022 22:04:09 +0200 Subject: [PATCH] update: make sub-clients stored in Lnd Struct public to avoid complete reliance on proxy methods --- src/lib.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index bf1af74..e259b31 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -162,6 +162,7 @@ impl Interceptor for LndInterceptor { } impl Lnd { + pub async fn get_info(&mut self) -> Result { self.lightning .get_info(GetInfoRequest {}) @@ -254,6 +255,16 @@ impl Lnd { .await .map(Response::into_inner) } + + pub async fn list_peers( + &mut self, + latest_error: bool + ) -> Result { + self.lightning.list_peers(ListPeersRequest{ latest_error }) + .await + .map(Response::into_inner) + } + } impl Lnd {