[#280] ir: Add governance processor unit tests

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-04-27 11:25:17 +03:00 committed by Evgenii Stratonikov
parent 31b4da225a
commit fb5dcc15d2
2 changed files with 331 additions and 8 deletions

View file

@ -53,20 +53,39 @@ type (
InnerRingKeys() (keys.PublicKeys, error)
}
FrostFSClient interface {
AlphabetUpdate(p frostfscontract.AlphabetUpdatePrm) error
}
NetmapClient interface {
UpdateInnerRing(p nmClient.UpdateIRPrm) error
}
MainnetClient interface {
NeoFSAlphabetList() (res keys.PublicKeys, err error)
GetDesignateHash() util.Uint160
}
MorphClient interface {
Committee() (res keys.PublicKeys, err error)
UpdateNeoFSAlphabetList(prm client.UpdateAlphabetListPrm) error
UpdateNotaryList(prm client.UpdateNotaryListPrm) error
}
// Processor of events related to governance in the network.
Processor struct {
log *logger.Logger
pool *ants.Pool
frostfsClient *frostfscontract.Client
netmapClient *nmClient.Client
frostfsClient FrostFSClient
netmapClient NetmapClient
alphabetState AlphabetState
epochState EpochState
voter Voter
irFetcher IRFetcher
mainnetClient *client.Client
morphClient *client.Client
mainnetClient MainnetClient
morphClient MorphClient
notaryDisabled bool
@ -82,10 +101,10 @@ type (
Voter Voter
IRFetcher IRFetcher
MorphClient *client.Client
MainnetClient *client.Client
FrostFSClient *frostfscontract.Client
NetmapClient *nmClient.Client
MorphClient MorphClient
MainnetClient MainnetClient
FrostFSClient FrostFSClient
NetmapClient NetmapClient
NotaryDisabled bool
}