[#1032] node/container/router: Do not check nil route points

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-12-09 22:42:36 +03:00 committed by Alex Vanin
parent fd9514f90e
commit df0d76dc19

View file

@ -24,6 +24,15 @@ func CheckRoute(builder Builder, a container.UsedSpaceAnnouncement, route []Serv
found := false
for j := range servers {
if servers[j] == nil {
// nil route point means that
// (i-1)-th node in the route
// must, among other things,
// save the announcement to its
// local memory
continue
}
if bytes.Equal(servers[j].PublicKey(), route[i].PublicKey()) {
found = true
break