Skip to content

Commit

Permalink
refactor: rebased retry params with current main branch v2.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Yashk767 committed Oct 4, 2024
1 parent ba77104 commit 282ab57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion core/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ const (
// ChainId corresponds to the EUROPA chain
var ChainId = big.NewInt(0x79f99296)

const MaxRetries uint = 4
const (
MaxRetries uint = 3
RetryDelayDuration int64 = 1
)

var NilHash = common.Hash{0x00}

Expand Down
2 changes: 1 addition & 1 deletion utils/struct-utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func InvokeFunctionWithRetryAttempts(ctx context.Context, interfaceName interfac
}
return nil
}
}, RetryInterface.RetryAttempts(core.MaxRetries))
}, RetryInterface.RetryAttempts(core.MaxRetries), retry.Delay(time.Second*time.Duration(core.RetryDelayDuration)), retry.DelayType(retry.FixedDelay))
if err != nil {
if contextError {
// Skip the alternate client switch when the error is context-related
Expand Down

0 comments on commit 282ab57

Please sign in to comment.