core: raise a louder warning for non-clique known blocks

This commit is contained in:
Péter Szilágyi 2019-05-10 16:37:03 +03:00
parent 69149ca133
commit 2d0b6e7577
No known key found for this signature in database
GPG key ID: E9AE538CEDF8293D

View file

@ -1238,7 +1238,11 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, []
// just skip the block (we already validated it once fully (and crashed), since // just skip the block (we already validated it once fully (and crashed), since
// its header and body was already in the database). // its header and body was already in the database).
if err == ErrKnownBlock { if err == ErrKnownBlock {
log.Debug("Inserted known block", "number", block.Number(), "hash", block.Hash(), logger := log.Debug
if bc.chainConfig.Clique == nil {
logger = log.Warn
}
logger("Inserted known block", "number", block.Number(), "hash", block.Hash(),
"uncles", len(block.Uncles()), "txs", len(block.Transactions()), "gas", block.GasUsed(), "uncles", len(block.Uncles()), "txs", len(block.Transactions()), "gas", block.GasUsed(),
"root", block.Root()) "root", block.Root())