resolving comments

This commit is contained in:
Lucca Martins 2025-02-25 15:13:36 -03:00
parent ca4eb48bd8
commit 844603ea4e
No known key found for this signature in database
GPG key ID: DC3D7F76BDAE23BF
3 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,6 @@ var (
const (
heimdallAPIBodyLimit = 128 * 1024 * 1024 // 128 MB
stateFetchLimit = 50
retryCall = 5 * time.Second
)
type StateSyncEventsResponse struct {
@ -293,7 +292,7 @@ func FetchWithRetry[T any](ctx context.Context, client http.Client, url *url.URL
log.Warn("an error while trying fetching from Heimdall", "path", url.Path, "attempt", attempt, "error", err)
// create a new ticker for retrying the request
ticker := time.NewTicker(retryCall)
ticker := time.NewTicker(client.Timeout)
defer ticker.Stop()
const logEach = 5

View file

@ -646,6 +646,7 @@ func DefaultConfig() *Config {
},
Heimdall: &HeimdallConfig{
URL: "http://localhost:1317",
Timeout: 5 * time.Second,
Without: false,
GRPCAddress: "",
},

View file

@ -171,7 +171,7 @@ func (c *Command) Flags(config *Config) *flagset.Flagset {
})
f.DurationFlag(&flagset.DurationFlag{
Name: "bor.heimdalltimeout",
Usage: "Timeout of Heimdall service",
Usage: "Timeout period for bor's outgoing requests to heimdall",
Value: &c.cliConfig.Heimdall.Timeout,
Default: 5 * time.Second,
})