Skip to content

Commit

Permalink
update: make sub-clients stored in Lnd Struct public to avoid complet…
Browse files Browse the repository at this point in the history
…e reliance on proxy methods
  • Loading branch information
Asone committed Jun 3, 2022
1 parent d1595d1 commit 6b84179
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ impl Interceptor for LndInterceptor {
}

impl Lnd {

pub async fn get_info(&mut self) -> Result<GetInfoResponse, Status> {
self.lightning
.get_info(GetInfoRequest {})
Expand Down Expand Up @@ -254,6 +255,16 @@ impl Lnd {
.await
.map(Response::into_inner)
}

pub async fn list_peers(
&mut self,
latest_error: bool
) -> Result<ListPeersResponse,Status> {
self.lightning.list_peers(ListPeersRequest{ latest_error })
.await
.map(Response::into_inner)
}

}

impl Lnd {
Expand Down

0 comments on commit 6b84179

Please sign in to comment.