core: don't print useless persist messages with nil errors

Errors should be printed only when there are errors.
This commit is contained in:
Roman Khimov 2019-09-22 20:06:52 +03:00
parent b15d9d1c36
commit 102c926ef3

View file

@ -169,7 +169,9 @@ func (bc *Blockchain) Run(ctx context.Context) {
case <-persistTimer.C:
go func() {
err := bc.Persist(ctx)
if err != nil {
log.Warnf("failed to persist blockchain: %s", err)
}
}()
persistTimer.Reset(persistInterval)
}