Skip to content

Commit

Permalink
fix: jitter on inspector start
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed Aug 27, 2024
1 parent a8f0693 commit feada8e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions node/pkg/checker/inspect/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"math/big"
"math/rand"
"os"
"strconv"
"strings"
Expand Down Expand Up @@ -114,6 +115,10 @@ func NewInspector(chainHelper *helper.ChainHelper, address string, accountID str
}

func (i *Inspector) Inspect(ctx context.Context) (string, error) {
log.Info().Str("Player", "Inspector").Msg("Inspecting...")
duration := time.Duration(rand.Intn(30)) * time.Second // sleep randomly so that rr doesn't request at the same time
time.Sleep(duration)

msg := "[Inspector]\n"
inspectVRFResult, err := i.inspectVRF(ctx)
if err != nil {
Expand Down

0 comments on commit feada8e

Please sign in to comment.