From df0d76dc19d2b7d88fb7661def3ba1be56abc445 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Thu, 9 Dec 2021 22:42:36 +0300 Subject: [PATCH] [#1032] node/container/router: Do not check nil route points Signed-off-by: Pavel Karpy --- pkg/services/container/announcement/load/route/util.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/services/container/announcement/load/route/util.go b/pkg/services/container/announcement/load/route/util.go index 91b55c50f..950bcbc1d 100644 --- a/pkg/services/container/announcement/load/route/util.go +++ b/pkg/services/container/announcement/load/route/util.go @@ -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