mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
resolving comments
This commit is contained in:
parent
ca4eb48bd8
commit
844603ea4e
3 changed files with 3 additions and 3 deletions
|
|
@ -33,7 +33,6 @@ var (
|
||||||
const (
|
const (
|
||||||
heimdallAPIBodyLimit = 128 * 1024 * 1024 // 128 MB
|
heimdallAPIBodyLimit = 128 * 1024 * 1024 // 128 MB
|
||||||
stateFetchLimit = 50
|
stateFetchLimit = 50
|
||||||
retryCall = 5 * time.Second
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type StateSyncEventsResponse struct {
|
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)
|
log.Warn("an error while trying fetching from Heimdall", "path", url.Path, "attempt", attempt, "error", err)
|
||||||
|
|
||||||
// create a new ticker for retrying the request
|
// create a new ticker for retrying the request
|
||||||
ticker := time.NewTicker(retryCall)
|
ticker := time.NewTicker(client.Timeout)
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
|
|
||||||
const logEach = 5
|
const logEach = 5
|
||||||
|
|
|
||||||
|
|
@ -646,6 +646,7 @@ func DefaultConfig() *Config {
|
||||||
},
|
},
|
||||||
Heimdall: &HeimdallConfig{
|
Heimdall: &HeimdallConfig{
|
||||||
URL: "http://localhost:1317",
|
URL: "http://localhost:1317",
|
||||||
|
Timeout: 5 * time.Second,
|
||||||
Without: false,
|
Without: false,
|
||||||
GRPCAddress: "",
|
GRPCAddress: "",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ func (c *Command) Flags(config *Config) *flagset.Flagset {
|
||||||
})
|
})
|
||||||
f.DurationFlag(&flagset.DurationFlag{
|
f.DurationFlag(&flagset.DurationFlag{
|
||||||
Name: "bor.heimdalltimeout",
|
Name: "bor.heimdalltimeout",
|
||||||
Usage: "Timeout of Heimdall service",
|
Usage: "Timeout period for bor's outgoing requests to heimdall",
|
||||||
Value: &c.cliConfig.Heimdall.Timeout,
|
Value: &c.cliConfig.Heimdall.Timeout,
|
||||||
Default: 5 * time.Second,
|
Default: 5 * time.Second,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue