[#16] Verify initial inner ring size and keys
closes #16 Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
33802137ee
commit
332e1ceca9
1 changed files with 7 additions and 0 deletions
|
@ -108,8 +108,15 @@ func Init(args [][]byte) bool {
|
|||
|
||||
var irList []node
|
||||
|
||||
if len(args) < 3 {
|
||||
panic("neofs: at least three inner ring keys must be provided")
|
||||
}
|
||||
|
||||
for i := 0; i < len(args); i++ {
|
||||
pub := args[i]
|
||||
if len(pub) != publicKeySize {
|
||||
panic("neofs: incorrect public key length")
|
||||
}
|
||||
irList = append(irList, node{pub: pub})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue