Skip to content

Commit

Permalink
Merge pull request #693 from rocket-pool/v1-fix-error-no-validators
Browse files Browse the repository at this point in the history
Skip request when there are no validators
  • Loading branch information
0xfornax authored Oct 30, 2024
2 parents ee04277 + 55b74d7 commit 54629df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shared/services/beacon/client/std-http-client.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ func (c *StandardHttpClient) GetValidatorStatuses(pubkeys []types.ValidatorPubke

// Get whether validators have sync duties to perform at given epoch
func (c *StandardHttpClient) GetValidatorSyncDuties(indices []string, epoch uint64) (map[string]bool, error) {
// Return if there are not validators to check
if len(indices) == 0 {
return nil, nil
}

// Perform the post request
responseBody, status, err := c.postRequest(fmt.Sprintf(RequestValidatorSyncDuties, strconv.FormatUint(epoch, 10)), indices)
Expand Down

0 comments on commit 54629df

Please sign in to comment.