There was an error while loading. Please reload this page.
1 parent c220b1f commit aac270dCopy full SHA for aac270d
1 file changed
api/validate.go
@@ -21,7 +21,6 @@ func (s *Server) validateFeeReceivers(ctx context.Context) {
21
if s.Offline {
22
return
23
}
24
- client := s.DataAccessNodes.Client()
25
const attempts = 5
26
for attempt := 1; attempt <= attempts; attempt++ {
27
select {
@@ -32,6 +31,9 @@ func (s *Server) validateFeeReceivers(ctx context.Context) {
32
31
if attempt > 1 {
33
time.Sleep(time.Duration(attempt) * time.Second)
34
+ // Pick a client on each attempt so a retry can land on a different
35
+ // access node if the previously selected one is unavailable.
36
+ client := s.DataAccessNodes.Client()
37
latest, err := client.LatestBlockHeader(ctx)
38
if err != nil {
39
log.Errorf("Failed to get the latest block header to validate fee receivers: %s", err)
0 commit comments