routerrpc: add htlc notifier subscribed event

This commit is contained in:
Joost Jager committed 2022-10-27 16:42:35 +02:00
1 parent 281cdd4209
commit b85cda2a1d
6 files changed
+484 -376

No files matched your search

+10
View File
@@ -900,6 +900,16 @@ func (s *Server) SubscribeHtlcEvents(req *SubscribeHtlcEventsRequest,
}
defer htlcClient.Cancel()
// Send out an initial subscribed event so that the caller knows the
// point from which new events will be transmitted.
if err := stream.Send(&HtlcEvent{
Event: &HtlcEvent_SubscribedEvent{
SubscribedEvent: &SubscribedEvent{},
},
}); err != nil {
return err
}
for {
select {
case event := <-htlcClient.Updates():