diff --git a/bold/assertions/sync.go b/bold/assertions/sync.go index 65e8b19f77..acb75d8898 100644 --- a/bold/assertions/sync.go +++ b/bold/assertions/sync.go @@ -300,7 +300,10 @@ func (m *Manager) findCanonicalAssertionBranch( return false, err } return expectedState.Equals(protocol.GoExecutionStateFromSolidity(assertion.AfterState)), nil - }, func(rc *retry.RetryConfig) { rc.LevelWarningError = "could not check if we have result at count" }) + }, func(rc *retry.RetryConfig) { + rc.LevelWarningError = "could not check if we have result at count" + rc.LevelInfoError = l2stateprovider.ErrChainCatchingUp.Error() + }) if err != nil { return errors.New("could not check for assertion agreements") } diff --git a/bold/runtime/retry.go b/bold/runtime/retry.go index 534b1712d3..e942f5b09a 100644 --- a/bold/runtime/retry.go +++ b/bold/runtime/retry.go @@ -27,6 +27,7 @@ var ( type RetryConfig struct { sleepTime time.Duration LevelWarningError string // can be extended to a list or regex if demanded in future, currently supporting for one error + LevelInfoError string // can be extended to a list or regex if demanded in future, currently supporting for one error } type Opt func(*RetryConfig) @@ -63,6 +64,9 @@ func UntilSucceedsMultipleReturnValue[T, U any](ctx context.Context, fn func() ( if cfg.LevelWarningError != "" && strings.Contains(err.Error(), cfg.LevelWarningError) { logLevel = log.Warn } + if cfg.LevelInfoError != "" && strings.Contains(err.Error(), cfg.LevelInfoError) { + logLevel = log.Info + } logLevel("Could not succeed function after retries", "retryCount", count, "err", err,