config: add state sync discovery_time setting (#5399)

Reduces the state sync discovery time from 20 to 15 seconds, and makes it configurable.
This commit is contained in:
Erik Grinaker
2020-09-24 16:01:45 +02:00
committed by GitHub
parent ebfe0cbb8c
commit f83ecdad1d
6 changed files with 17 additions and 12 deletions

View File

@@ -580,7 +580,7 @@ func startStateSync(ssR *statesync.Reactor, bcR fastSyncReactor, conR *cs.Reacto
}
go func() {
state, commit, err := ssR.Sync(stateProvider)
state, commit, err := ssR.Sync(stateProvider, config.DiscoveryTime)
if err != nil {
ssR.Logger.Error("State sync failed", "err", err)
return