forked from TrueCloudLab/frostfs-node
[#280] ir: Add governance processor unit tests
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
31b4da225a
commit
fb5dcc15d2
2 changed files with 331 additions and 8 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue