Slow DownloadMissingBlocks updates after initial sync from one per second to one every two minutes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8298483591
commit
4ec4872194
|
@ -513,10 +513,15 @@ func (s *Server) Listen() (err error) {
|
|||
for range utils.ContextTick(s.ctx, time.Second) {
|
||||
if s.SideChain().PreCalcFinished() {
|
||||
s.ClearCachedBlocks()
|
||||
break
|
||||
}
|
||||
|
||||
s.DownloadMissingBlocks()
|
||||
}
|
||||
// Slow down updates for missing blocks after sync
|
||||
for range utils.ContextTick(s.ctx, time.Minute*2) {
|
||||
s.DownloadMissingBlocks()
|
||||
}
|
||||
}()
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
|
|
Loading…
Reference in a new issue