forked from TrueCloudLab/frostfs-node
[#337] netmap: Remove unused events
Done in TrueCloudLab/frostfs-contract#16. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
b480df4985
commit
47b0ec33c3
5 changed files with 1 additions and 199 deletions
|
@ -119,9 +119,7 @@ type (
|
|||
)
|
||||
|
||||
const (
|
||||
newEpochNotification = "NewEpoch"
|
||||
addPeerNotification = "AddPeer"
|
||||
updatePeerStateNotification = "UpdateState"
|
||||
newEpochNotification = "NewEpoch"
|
||||
)
|
||||
|
||||
// New creates network map contract processor instance.
|
||||
|
@ -189,20 +187,6 @@ func (np *Processor) ListenerNotificationParsers() []event.NotificationParserInf
|
|||
p.SetParser(netmapEvent.ParseNewEpoch)
|
||||
parsers = append(parsers, p)
|
||||
|
||||
if !np.notaryDisabled {
|
||||
return parsers
|
||||
}
|
||||
|
||||
// new peer event
|
||||
p.SetType(addPeerNotification)
|
||||
p.SetParser(netmapEvent.ParseAddPeer)
|
||||
parsers = append(parsers, p)
|
||||
|
||||
// update peer event
|
||||
p.SetType(updatePeerStateNotification)
|
||||
p.SetParser(netmapEvent.ParseUpdatePeer)
|
||||
parsers = append(parsers, p)
|
||||
|
||||
return parsers
|
||||
}
|
||||
|
||||
|
@ -219,20 +203,6 @@ func (np *Processor) ListenerNotificationHandlers() []event.NotificationHandlerI
|
|||
i.SetHandler(np.handleNewEpoch)
|
||||
handlers = append(handlers, i)
|
||||
|
||||
if !np.notaryDisabled {
|
||||
return handlers
|
||||
}
|
||||
|
||||
// new peer handler
|
||||
i.SetType(addPeerNotification)
|
||||
i.SetHandler(np.handleAddPeer)
|
||||
handlers = append(handlers, i)
|
||||
|
||||
// update peer handler
|
||||
i.SetType(updatePeerStateNotification)
|
||||
i.SetHandler(np.handleUpdateState)
|
||||
handlers = append(handlers, i)
|
||||
|
||||
return handlers
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue