Skip to content

Commit

Permalink
gaston's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
PatStiles committed Jan 2, 2025
1 parent d2cd86f commit 9967909
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/chainio/avs_subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (s *AvsSubscriber) SubscribeToNewTasksV2(newTaskCreatedChan chan *servicema
case err := <-subFallback.Err():
s.logger.Warn("Error in fallback new task subscription", "err", err)
subFallback.Unsubscribe()
subFallback, err = SubscribeToNewTasksV2Retryable(&bind.WatchOpts{}, s.AvsContractBindings.ServiceManagerFallback, internalChannel, nil, retry.NetworkRetryParams())
subFallback, err = SubscribeToNewTasksV2Retryable(&bind.WatchOpts{}, s.AvsContractBindings.ServiceManagerFallback, internalChannel, nil, retry.SubscribeToNewTasksParams())
if err != nil {
errorChannel <- err
}
Expand Down
2 changes: 1 addition & 1 deletion core/chainio/retryable.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (s *AvsSubscriber) SubscribeNewHeadRetryable(ctx context.Context, c chan<-
SubscribeToNewTasksV2Retryable
Subscribe to NewBatchV2 logs from the AVS contract.
- All errors are considered Transient Errors
- Retry times (3 retries): 1 sec, 2 sec, 4 sec.
- Retry times (Infinite Retries): 1 sec, 2 sec, 4 sec, 8 sec, ..., 60 sec, ...,
*/
func SubscribeToNewTasksV2Retryable(
opts *bind.WatchOpts,
Expand Down
4 changes: 2 additions & 2 deletions core/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ const (
RespondToTaskV2MaxElapsedTime = 0 // Maximum time all retries may take. `0` corresponds to no limit on the time of the retries.
RespondToTaskV2NumRetries = 0 // Total number of retries attempted. If 0, retries indefinitely until maxElapsedTime is reached.

// Retry Parameters for SubscribeToNewTasksV3
SubscribeToNewTasksNumRetries = 0 // Total number of retries attempted. If 0, retries indefinitely until maxElapsedTime is reached.
// Retry Parameters for SubscribeToNewTasks
SubscribeToNewTasksNumRetries = 0 // Total number of retries attempted. If 0, retries indefinitely until maxElapsedTime (60 sec) is reached.
)

type RetryParams struct {
Expand Down

0 comments on commit 9967909

Please sign in to comment.