[#337] subscriber: Drop unused UnsubscribeForNotification

It's not really needed, closing the connection works fine when exiting and
normally the app doesn't need to unsubscribe at all.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
feature/325-policer_off
Roman Khimov 2023-04-17 19:00:54 +03:00 committed by Evgenii Stratonikov
parent 800eb5e983
commit a5f118a987
2 changed files with 0 additions and 10 deletions

View File

@ -195,7 +195,6 @@ const (
EventIgnoreNilNotaryEventHandler = "ignore nil notary event handler" // Warn in ../node/pkg/morph/event/listener.go
EventIgnoreHandlerOfNotaryEventWoParser = "ignore handler of notary event w/o parser" // Warn in ../node/pkg/morph/event/listener.go
EventIgnoreNilBlockHandler = "ignore nil block handler" // Warn in ../node/pkg/morph/event/listener.go
SubscriberUnsubscribeForNotification = "unsubscribe for notification" // Error in ../node/pkg/morph/subscriber/subscriber.go
SubscriberRemoteNotificationChannelHasBeenClosed = "remote notification channel has been closed" // Warn in ../node/pkg/morph/subscriber/subscriber.go
SubscriberCantCastNotifyEventValueToTheNotifyStruct = "can't cast notify event value to the notify struct" // Error in ../node/pkg/morph/subscriber/subscriber.go
SubscriberNewNotificationEventFromSidechain = "new notification event from sidechain" // Debug in ../node/pkg/morph/subscriber/subscriber.go

View File

@ -27,7 +27,6 @@ type (
// Subscriber is an interface of the NotificationEvent listener.
Subscriber interface {
SubscribeForNotification(...util.Uint160) error
UnsubscribeForNotification()
BlockNotifications() error
SubscribeForNotaryRequests(mainTXSigner util.Uint160) error
@ -97,14 +96,6 @@ func (s *subscriber) SubscribeForNotification(contracts ...util.Uint160) error {
return nil
}
func (s *subscriber) UnsubscribeForNotification() {
err := s.client.UnsubscribeAll()
if err != nil {
s.log.Error(logs.SubscriberUnsubscribeForNotification,
zap.Error(err))
}
}
func (s *subscriber) Close() {
s.client.Close()
}