forked from TrueCloudLab/frostfs-node
[#21] ir: Add inner ring list relay processor
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
f11ae1035d
commit
4aee3de24e
3 changed files with 54 additions and 0 deletions
|
@ -51,6 +51,7 @@ const (
|
|||
withdrawNotification = "Withdraw"
|
||||
chequeNotification = "Cheque"
|
||||
configNotification = "SetConfig"
|
||||
updateIRNotification = "InnerRingUpdate"
|
||||
)
|
||||
|
||||
// New creates neofs mainnet contract processor instance.
|
||||
|
@ -117,6 +118,13 @@ func (np *Processor) ListenerParsers() []event.ParserInfo {
|
|||
config.SetParser(neofsEvent.ParseConfig)
|
||||
parsers = append(parsers, config)
|
||||
|
||||
// update inner ring event
|
||||
updateIR := event.ParserInfo{}
|
||||
updateIR.SetType(updateIRNotification)
|
||||
updateIR.SetScriptHash(np.neofsContract)
|
||||
updateIR.SetParser(neofsEvent.ParseUpdateInnerRing)
|
||||
parsers = append(parsers, updateIR)
|
||||
|
||||
return parsers
|
||||
}
|
||||
|
||||
|
@ -152,6 +160,13 @@ func (np *Processor) ListenerHandlers() []event.HandlerInfo {
|
|||
config.SetHandler(np.handleConfig)
|
||||
handlers = append(handlers, config)
|
||||
|
||||
// updateIR handler
|
||||
updateIR := event.HandlerInfo{}
|
||||
updateIR.SetType(updateIRNotification)
|
||||
updateIR.SetScriptHash(np.neofsContract)
|
||||
updateIR.SetHandler(np.handleUpdateInnerRing)
|
||||
handlers = append(handlers, updateIR)
|
||||
|
||||
return handlers
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue