[#1546] morph/event: Export NotificationHandlerInfo fields

Hiding them achieves nothing, as the struct has no methods and is not
used concurrently.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-12-06 16:12:47 +03:00 committed by Evgenii Stratonikov
parent d0ce835fbf
commit b1614a284d
8 changed files with 75 additions and 110 deletions

View file

@ -163,19 +163,14 @@ func New(p *Params) (*Processor, error) {
// ListenerNotificationHandlers for the 'event.Listener' event producer.
func (np *Processor) ListenerNotificationHandlers() []event.NotificationHandlerInfo {
handlers := make([]event.NotificationHandlerInfo, 0, 3)
var i event.NotificationHandlerInfo
i.SetScriptHash(np.netmapClient.ContractAddress())
// new epoch handler
i.SetType(newEpochNotification)
i.SetParser(netmapEvent.ParseNewEpoch)
i.AddHandler(np.handleNewEpoch)
handlers = append(handlers, i)
return handlers
return []event.NotificationHandlerInfo{
{
Contract: np.netmapClient.ContractAddress(),
Type: newEpochNotification,
Parser: netmapEvent.ParseNewEpoch,
Handlers: []event.Handler{np.handleNewEpoch},
},
}
}
// ListenerNotaryParsers for the 'event.Listener' event producer.