[#488] reputation/common: Move ServerInfo to common pkg

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-04-23 17:54:55 +03:00 committed by Alex Vanin
parent f7aa79f0b6
commit e69917b27a
8 changed files with 32 additions and 32 deletions

View file

@ -5,6 +5,7 @@ import (
"errors"
"github.com/nspcc-dev/neofs-node/pkg/services/reputation"
"github.com/nspcc-dev/neofs-node/pkg/services/reputation/common"
)
var errWrongRoute = errors.New("wrong route")
@ -12,7 +13,7 @@ var errWrongRoute = errors.New("wrong route")
// CheckRoute checks if the route is a route correctly constructed by the builder for value a.
//
// Returns nil if route is correct, otherwise an error clarifying the inconsistency.
func CheckRoute(builder Builder, epoch uint64, t reputation.Trust, route []ServerInfo) error {
func CheckRoute(builder Builder, epoch uint64, t reputation.Trust, route []common.ServerInfo) error {
for i := 1; i < len(route); i++ {
servers, err := builder.NextStage(epoch, t, route[:i])
if err != nil {