core: reschedule the next persist in a second from previous one

It makes little sense queueing up several persistence goroutines (or actually
even running them concurrently).
This commit is contained in:
Roman Khimov 2020-02-24 17:17:25 +03:00
parent cad1f074d4
commit b49808b766

View file

@ -278,8 +278,8 @@ func (bc *Blockchain) Run() {
if err != nil { if err != nil {
bc.log.Warn("failed to persist blockchain", zap.Error(err)) bc.log.Warn("failed to persist blockchain", zap.Error(err))
} }
persistTimer.Reset(persistInterval)
}() }()
persistTimer.Reset(persistInterval)
} }
} }
} }