From 3a206b5d7a55940c2f7d3a519c66fb8dfb30acf4 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 7 Sep 2022 14:20:31 +0400 Subject: [PATCH] [#1763] morph/event: Write log message about new notification event Sometimes it is useful to track sidechain events processed by the node. For example, we need some easy way to look up for log messages about new epoch notifications. Make `subscriber.Subscriber` to log names of all events received from the sidechain notification channel. Signed-off-by: Leonard Lyubich --- pkg/morph/subscriber/subscriber.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/morph/subscriber/subscriber.go b/pkg/morph/subscriber/subscriber.go index 8a95126f..cf5b6ccd 100644 --- a/pkg/morph/subscriber/subscriber.go +++ b/pkg/morph/subscriber/subscriber.go @@ -133,6 +133,10 @@ func (s *subscriber) routeNotifications(ctx context.Context) { continue } + s.log.Debug("new notification event from sidechain", + zap.String("name", notifyEvent.Name), + ) + s.notifyChan <- notifyEvent case neorpc.BlockEventID: b, ok := notification.Value.(*block.Block)