statesync: increase chunk priority and robustness (#6582)

This commit is contained in:
Callum Waters
2021-06-18 09:59:52 +02:00
committed by GitHub
parent be8c9833ca
commit d515bbcf1d
7 changed files with 41 additions and 29 deletions
+2 -2
View File
@@ -789,8 +789,8 @@ func (cfg *StateSyncConfig) ValidateBasic() error {
return fmt.Errorf("invalid trusted_hash: %w", err)
}
if cfg.ChunkRequestTimeout < time.Second {
return errors.New("chunk_request_timeout must be least a one second")
if cfg.ChunkRequestTimeout < 5*time.Second {
return errors.New("chunk_request_timeout must be at least 5 seconds")
}
if cfg.ChunkFetchers <= 0 {