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

This commit is contained in:
DataHoarder 2023-07-22 01:13:01 +02:00
parent 8298483591
commit 4ec4872194
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -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() {