Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
persist_channel
Browse files Browse the repository at this point in the history
  • Loading branch information
modenl committed Sep 13, 2019
1 parent f92460c commit 4f8177a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lnd_grpc/invoices.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def __init__(
def invoice_stub(self) -> invrpc.InvoicesStub:
if self._inv_stub is None:
ssl_creds = grpc.ssl_channel_credentials(self.tls_cert)
_inv_channel = grpc.secure_channel(
self._inv_channel = grpc.secure_channel(
target=self.grpc_address,
credentials=self.combined_credentials,
options=self.grpc_options,
)
self._inv_stub = invrpc.InvoicesStub(_inv_channel)
self._inv_stub = invrpc.InvoicesStub(self._inv_channel)
return self._inv_stub

def subscribe_single_invoice(
Expand Down
4 changes: 2 additions & 2 deletions lnd_grpc/wallet_unlocker.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ def __init__(
def wallet_unlocker_stub(self) -> lnrpc.WalletUnlockerStub:
if self._w_stub is None:
ssl_creds = grpc.ssl_channel_credentials(self.tls_cert)
_w_channel = grpc.secure_channel(
self._w_channel = grpc.secure_channel(
target=self.grpc_address,
credentials=ssl_creds,
options=self.grpc_options,
)
self._w_stub = lnrpc.WalletUnlockerStub(_w_channel)
self._w_stub = lnrpc.WalletUnlockerStub(self._w_channel)

# simulate connection status change after wallet stub used (typically wallet unlock) which
# stimulates lightning stub regeneration when necessary
Expand Down

0 comments on commit 4f8177a

Please sign in to comment.