From 2969548f688ea9f93746ac0574dd0571bc0f7f56 Mon Sep 17 00:00:00 2001 From: Gerui Wang Date: Tue, 21 Dec 2021 16:06:16 +0800 Subject: [PATCH] add warn for reorg --- core/blockchain.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/blockchain.go b/core/blockchain.go index ff760d0c8b..b90b0fe372 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -2116,6 +2116,7 @@ func (bc *BlockChain) reorg(oldBlock, newBlock *types.Block) error { } } ) + log.Warn("Reorg", "oldBlock hash", oldBlock.Hash().Hex(), "number", oldBlock.NumberU64(), "newBlock hash", newBlock.Hash().Hex(), "number", newBlock.NumberU64()) // first reduce whoever is higher bound if oldBlock.NumberU64() > newBlock.NumberU64() { @@ -2160,7 +2161,7 @@ func (bc *BlockChain) reorg(oldBlock, newBlock *types.Block) error { } // Ensure the user sees large reorgs if len(oldChain) > 0 && len(newChain) > 0 { - logFn := log.Debug + logFn := log.Warn if len(oldChain) > 63 { logFn = log.Warn }