Skip to content

Commit cd44e2d

Browse files
fix rendezvous
1 parent 14d20a0 commit cd44e2d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

api/v1_validators.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package api
33
import (
44
"context"
55
"strconv"
6+
"strings"
67
"sync"
78
"time"
89

@@ -81,7 +82,13 @@ func (app *ApiServer) updateNodes(ctx context.Context) {
8182
})
8283
}
8384
app.validators.SetNodes(nodesList)
84-
rendezvous.Refresh(nodesList)
85+
rendezvousNodes := make([]config.Node, 0, len(nodesList))
86+
for _, n := range nodesList {
87+
if strings.EqualFold(n.ServiceType, "validator") || strings.EqualFold(n.ServiceType, "content-node") {
88+
rendezvousNodes = append(rendezvousNodes, n)
89+
}
90+
}
91+
rendezvous.Refresh(rendezvousNodes)
8592
}
8693

8794
func (app *ApiServer) v1Validators(c *fiber.Ctx) error {

0 commit comments

Comments
 (0)