Merge pull request #4298 from cfromknecht/sub-inv-fixes

channeldb+invoices: minor invoice subscription fixes
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2020-05-27 15:56:47 -07:00
commit d2d8793afd
5 files changed
+41 -30

No files matched your search

+4 -1
View File
@@ -4535,9 +4535,12 @@ func (r *rpcServer) ListInvoices(ctx context.Context,
func (r *rpcServer) SubscribeInvoices(req *lnrpc.InvoiceSubscription,
updateStream lnrpc.Lightning_SubscribeInvoicesServer) error {
invoiceClient := r.server.invoices.SubscribeNotifications(
invoiceClient, err := r.server.invoices.SubscribeNotifications(
req.AddIndex, req.SettleIndex,
)
if err != nil {
return err
}
defer invoiceClient.Cancel()
for {