forked from TrueCloudLab/frostfs-node
[#1032] node/container/router: Do not check nil route points
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
fd9514f90e
commit
df0d76dc19
1 changed files with 9 additions and 0 deletions
|
@ -24,6 +24,15 @@ func CheckRoute(builder Builder, a container.UsedSpaceAnnouncement, route []Serv
|
||||||
found := false
|
found := false
|
||||||
|
|
||||||
for j := range servers {
|
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()) {
|
if bytes.Equal(servers[j].PublicKey(), route[i].PublicKey()) {
|
||||||
found = true
|
found = true
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue