mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-27 17:56:16 +02:00
routerrpc: add htlc notifier subscribed event
This commit is contained in:
@@ -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():
|
||||
|
Reference in New Issue
Block a user