[#1546] morph/event: Export NotificationHandlerInfo fields
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 1m52s
DCO action / DCO (pull_request) Successful in 2m9s
Vulncheck / Vulncheck (pull_request) Successful in 3m14s
Tests and linters / Staticcheck (pull_request) Successful in 3m26s
Build / Build Components (pull_request) Successful in 3m45s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m29s
Tests and linters / Lint (pull_request) Successful in 4m43s
Tests and linters / Tests (pull_request) Successful in 4m48s
Tests and linters / gopls check (pull_request) Successful in 5m4s
Tests and linters / Tests with -race (pull_request) Successful in 5m48s
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 1m52s
DCO action / DCO (pull_request) Successful in 2m9s
Vulncheck / Vulncheck (pull_request) Successful in 3m14s
Tests and linters / Staticcheck (pull_request) Successful in 3m26s
Build / Build Components (pull_request) Successful in 3m45s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m29s
Tests and linters / Lint (pull_request) Successful in 4m43s
Tests and linters / Tests (pull_request) Successful in 4m48s
Tests and linters / gopls check (pull_request) Successful in 5m4s
Tests and linters / Tests with -race (pull_request) Successful in 5m48s
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:
parent
86553fdf49
commit
985be9aef7
8 changed files with 75 additions and 110 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue