Skip to content

Commit

Permalink
fix: adding context to the retryable
Browse files Browse the repository at this point in the history
  • Loading branch information
praetoriansentry committed Nov 2, 2023
1 parent 8fe3761 commit e7a895b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/loadtest/loadtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ func getERC721Contract(ctx context.Context, c *ethclient.Client, tops *bind.Tran

func blockUntilSuccessful(ctx context.Context, c *ethclient.Client, retryable func() error) error {
// this function use to be very complicated (and not work). I'm dumbing this down to a basic time based retryable which should work 99% of the time
b := backoff.WithMaxRetries(backoff.NewConstantBackOff(5*time.Second), 24)
b := backoff.WithContext(backoff.WithMaxRetries(backoff.NewConstantBackOff(5*time.Second), 24), ctx)
return backoff.Retry(retryable, b)
}

Expand Down

0 comments on commit e7a895b

Please sign in to comment.