core: don't print useless persist messages with nil errors
Errors should be printed only when there are errors.
This commit is contained in:
parent
b15d9d1c36
commit
102c926ef3
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue