From 4b4bac675b930e9d12efc9ac7d069910a6d41582 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Sun, 22 Sep 2019 20:08:15 +0300 Subject: [PATCH] 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(). --- pkg/core/blockchain.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 93991ff15..068401b03 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -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)