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

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
remotes/fyrchik/prometheus-epoch
Pavel Karpy 2021-12-09 22:42:36 +03:00 committed by Alex Vanin
parent fd9514f90e
commit df0d76dc19
1 changed files with 9 additions and 0 deletions

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