[#337] container: Remove unused events

Done in TrueCloudLab/frostfs-contract#16.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-05-11 18:14:00 +03:00 committed by Evgenii Stratonikov
parent bcdb0f330d
commit b480df4985
7 changed files with 2 additions and 409 deletions

View file

@ -79,13 +79,6 @@ type NetworkState interface {
HomomorphicHashDisabled() (bool, error)
}
const (
putNotification = "containerPut"
deleteNotification = "containerDelete"
setEACLNotification = "setEACL"
)
// New creates a container contract processor instance.
func New(p *Params) (*Processor, error) {
switch {
@ -121,66 +114,12 @@ func New(p *Params) (*Processor, error) {
// ListenerNotificationParsers for the 'event.Listener' event producer.
func (cp *Processor) ListenerNotificationParsers() []event.NotificationParserInfo {
if !cp.notaryDisabled {
return nil
}
var (
parsers = make([]event.NotificationParserInfo, 0, 3)
p event.NotificationParserInfo
)
p.SetScriptHash(cp.cnrClient.ContractAddress())
// container put
p.SetType(event.TypeFromString(putNotification))
p.SetParser(containerEvent.ParsePut)
parsers = append(parsers, p)
// container delete
p.SetType(event.TypeFromString(deleteNotification))
p.SetParser(containerEvent.ParseDelete)
parsers = append(parsers, p)
// set eACL
p.SetType(event.TypeFromString(setEACLNotification))
p.SetParser(containerEvent.ParseSetEACL)
parsers = append(parsers, p)
return parsers
return nil
}
// ListenerNotificationHandlers for the 'event.Listener' event producer.
func (cp *Processor) ListenerNotificationHandlers() []event.NotificationHandlerInfo {
if !cp.notaryDisabled {
return nil
}
var (
handlers = make([]event.NotificationHandlerInfo, 0, 3)
h event.NotificationHandlerInfo
)
h.SetScriptHash(cp.cnrClient.ContractAddress())
// container put
h.SetType(event.TypeFromString(putNotification))
h.SetHandler(cp.handlePut)
handlers = append(handlers, h)
// container delete
h.SetType(event.TypeFromString(deleteNotification))
h.SetHandler(cp.handleDelete)
handlers = append(handlers, h)
// set eACL
h.SetType(event.TypeFromString(setEACLNotification))
h.SetHandler(cp.handleSetEACL)
handlers = append(handlers, h)
return handlers
return nil
}
// ListenerNotaryParsers for the 'event.Listener' notary event producer.