[#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>
This commit is contained in:
parent
800eb5e983
commit
a5f118a987
2 changed files with 0 additions and 10 deletions
|
@ -195,7 +195,6 @@ const (
|
||||||
EventIgnoreNilNotaryEventHandler = "ignore nil notary event handler" // Warn in ../node/pkg/morph/event/listener.go
|
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
|
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
|
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
|
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
|
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
|
SubscriberNewNotificationEventFromSidechain = "new notification event from sidechain" // Debug in ../node/pkg/morph/subscriber/subscriber.go
|
||||||
|
|
|
@ -27,7 +27,6 @@ type (
|
||||||
// Subscriber is an interface of the NotificationEvent listener.
|
// Subscriber is an interface of the NotificationEvent listener.
|
||||||
Subscriber interface {
|
Subscriber interface {
|
||||||
SubscribeForNotification(...util.Uint160) error
|
SubscribeForNotification(...util.Uint160) error
|
||||||
UnsubscribeForNotification()
|
|
||||||
BlockNotifications() error
|
BlockNotifications() error
|
||||||
SubscribeForNotaryRequests(mainTXSigner util.Uint160) error
|
SubscribeForNotaryRequests(mainTXSigner util.Uint160) error
|
||||||
|
|
||||||
|
@ -97,14 +96,6 @@ func (s *subscriber) SubscribeForNotification(contracts ...util.Uint160) error {
|
||||||
return nil
|
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() {
|
func (s *subscriber) Close() {
|
||||||
s.client.Close()
|
s.client.Close()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue