forked from TrueCloudLab/frostfs-node
[#280] ir: Add alphabet processor unit tests
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
53693071de
commit
e89fa7f69f
4 changed files with 316 additions and 15 deletions
|
@ -19,7 +19,7 @@ type contracts struct {
|
|||
processing util.Uint160 // in mainnet
|
||||
frostfsID util.Uint160 // in morph
|
||||
|
||||
alphabet alphabetContracts // in morph
|
||||
alphabet AlphabetContracts // in morph
|
||||
}
|
||||
|
||||
func parseContracts(cfg *viper.Viper, morph nnsResolver, withoutMainNet, withoutMainNotary, withoutSideNotary bool) (*contracts, error) {
|
||||
|
@ -76,9 +76,9 @@ func parseContracts(cfg *viper.Viper, morph nnsResolver, withoutMainNet, without
|
|||
return result, nil
|
||||
}
|
||||
|
||||
func parseAlphabetContracts(cfg *viper.Viper, morph nnsResolver) (alphabetContracts, error) {
|
||||
func parseAlphabetContracts(cfg *viper.Viper, morph nnsResolver) (AlphabetContracts, error) {
|
||||
num := GlagoliticLetter(cfg.GetUint("contracts.alphabet.amount"))
|
||||
alpha := newAlphabetContracts()
|
||||
alpha := NewAlphabetContracts()
|
||||
|
||||
if num > lastLetterNum {
|
||||
return nil, fmt.Errorf("amount of alphabet contracts overflows glagolitsa %d > %d", num, lastLetterNum)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue