[#755] morph: Drop FrostFSID contract usage

Unused.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-11-20 14:32:26 +03:00
parent d5c9dd3c83
commit 1cd2bfe51a
18 changed files with 16 additions and 844 deletions

View file

@ -8,7 +8,6 @@ import (
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/innerring/metrics"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/balance"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/frostfsid"
nmClient "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/netmap"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event"
frostfsEvent "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event/frostfs"
@ -51,11 +50,6 @@ type (
TransferGas(receiver util.Uint160, amount fixedn.Fixed8) error
}
IDClient interface {
AddKeys(p frostfsid.CommonBindPrm) error
RemoveKeys(args frostfsid.CommonBindPrm) error
}
// Processor of events produced by frostfs contract in main net.
Processor struct {
log *logger.Logger
@ -73,7 +67,6 @@ type (
mintEmitThreshold uint64
mintEmitValue fixedn.Fixed8
gasBalanceThreshold int64
frostfsIDClient IDClient
}
// Params of the processor constructor.
@ -82,7 +75,6 @@ type (
Metrics metrics.Register
PoolSize int
FrostFSContract util.Uint160
FrostFSIDClient IDClient
BalanceClient BalanceClient
NetmapClient NetmapClient
MorphClient MorphClient
@ -101,8 +93,6 @@ const (
withdrawNotification = "Withdraw"
chequeNotification = "Cheque"
configNotification = "SetConfig"
bindNotification = "Bind"
unbindNotification = "Unbind"
)
// New creates frostfs mainnet contract processor instance.
@ -152,8 +142,6 @@ func New(p *Params) (*Processor, error) {
mintEmitThreshold: p.MintEmitThreshold,
mintEmitValue: p.MintEmitValue,
gasBalanceThreshold: p.GasBalanceThreshold,
frostfsIDClient: p.FrostFSIDClient,
}, nil
}
@ -187,16 +175,6 @@ func (np *Processor) ListenerNotificationParsers() []event.NotificationParserInf
p.SetParser(frostfsEvent.ParseConfig)
parsers = append(parsers, p)
// bind event
p.SetType(event.TypeFromString(bindNotification))
p.SetParser(frostfsEvent.ParseBind)
parsers = append(parsers, p)
// unbind event
p.SetType(event.TypeFromString(unbindNotification))
p.SetParser(frostfsEvent.ParseUnbind)
parsers = append(parsers, p)
return parsers
}
@ -230,16 +208,6 @@ func (np *Processor) ListenerNotificationHandlers() []event.NotificationHandlerI
h.SetHandler(np.handleConfig)
handlers = append(handlers, h)
// bind handler
h.SetType(event.TypeFromString(bindNotification))
h.SetHandler(np.handleBind)
handlers = append(handlers, h)
// unbind handler
h.SetType(event.TypeFromString(unbindNotification))
h.SetHandler(np.handleUnbind)
handlers = append(handlers, h)
return handlers
}