core: don't print persisting errors twice

As they're already printed in the calling goroutine. And they're alse not
always useful when printed by Persist().
This commit is contained in:
Roman Khimov 2019-09-22 20:08:15 +03:00
parent 102c926ef3
commit 4b4bac675b

View file

@ -414,7 +414,6 @@ func (bc *Blockchain) Persist(ctx context.Context) (err error) {
hash := headerList.Get(int(bc.BlockHeight() + 1))
if block, ok := bc.blockCache.GetBlock(hash); ok {
if err = bc.persistBlock(block); err != nil {
log.Warnf("failed to persist blocks: %s", err)
return
}
bc.blockCache.Delete(hash)