invoicesrpc: SubcribeSingleInvoiceRequest fix

This fixes a bug where the RHashStr field on the PaymentHash request for
SubscribeSingleInvoice was being ignored. This replaces the PaymentHash
message for the SubscribeSingleInvoice request with a new message called
SubscribeSingleInvoiceRequest that contains only the RHash field.
This commit is contained in:
Daniel McNally committed 2019-05-10 22:02:58 -04:00
1 parent c4415f0400
commit c9afa6469f
3 files changed
+96 -48

No files matched your search

+3 -3
View File
@@ -168,9 +168,9 @@ func (s *Server) RegisterWithRootServer(grpcServer *grpc.Server) error {
return nil
}
// SubscribeInvoices returns a uni-directional stream (server -> client) for
// notifying the client of invoice state changes.
func (s *Server) SubscribeSingleInvoice(req *lnrpc.PaymentHash,
// SubscribeSingleInvoice returns a uni-directional stream (server -> client)
// for notifying the client of state changes for a specified invoice.
func (s *Server) SubscribeSingleInvoice(req *SubscribeSingleInvoiceRequest,
updateStream Invoices_SubscribeSingleInvoiceServer) error {
hash, err := lntypes.MakeHash(req.RHash)