[#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

@ -4,6 +4,7 @@ import (
"context"
"github.com/nspcc-dev/neo-go/pkg/core/block"
"github.com/nspcc-dev/neo-go/pkg/util"
)
// Handler is an Event processing function.
@ -16,25 +17,10 @@ type BlockHandler func(context.Context, *block.Block)
// the parameters of the handler of particular
// contract event.
type NotificationHandlerInfo struct {
scriptHashWithType
parser NotificationParser
handlers []Handler
}
// SetParser is an event handler setter.
func (s *NotificationHandlerInfo) SetParser(p NotificationParser) {
s.parser = p
}
// AddHandler adds an event handler.
func (s *NotificationHandlerInfo) AddHandler(v Handler) {
s.handlers = append(s.handlers, v)
}
// Handler returns an event handler.
func (s NotificationHandlerInfo) Handlers() []Handler {
return s.handlers
Contract util.Uint160
Type Type
Parser NotificationParser
Handlers []Handler
}
// NotaryHandlerInfo is a structure that groups