[#80] netmap: process subnet in selection
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
b49404d9b6
commit
279a5a1e0b
4 changed files with 135 additions and 2 deletions
|
@ -3,6 +3,7 @@ package netmap
|
|||
import (
|
||||
"testing"
|
||||
|
||||
subnetid "github.com/nspcc-dev/neofs-sdk-go/subnet/id"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
@ -42,6 +43,12 @@ func newReplica(c uint32, s string) *Replica {
|
|||
return r
|
||||
}
|
||||
|
||||
func newSubnetID(id uint32) *subnetid.ID {
|
||||
var s subnetid.ID
|
||||
s.SetNumber(id)
|
||||
return &s
|
||||
}
|
||||
|
||||
func nodeInfoFromAttributes(props ...string) NodeInfo {
|
||||
attrs := make([]*NodeAttribute, len(props)/2)
|
||||
for i := range attrs {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue