diff --git a/core/blockchain_insert.go b/core/blockchain_insert.go index 3e913cb87b..ffe2d6501c 100644 --- a/core/blockchain_insert.go +++ b/core/blockchain_insert.go @@ -56,7 +56,7 @@ func (st *insertStats) report(chain []*types.Block, index int, dirty common.Stor // Assemble the log context and send it to the logger context := []interface{}{ - "number", end.Number(), "hash", end.Hash(), + "number", end.Number(), "hash", end.Hash(), "miner", end.Coinbase(), "blocks", st.processed, "txs", txs, "mgas", float64(st.usedGas) / 1000000, "elapsed", common.PrettyDuration(elapsed), "mgasps", float64(st.usedGas) * 1000 / float64(elapsed), } diff --git a/core/forkchoice.go b/core/forkchoice.go index d2e939fad2..c42ed24d6f 100644 --- a/core/forkchoice.go +++ b/core/forkchoice.go @@ -137,5 +137,9 @@ func (f *ForkChoice) ReorgNeededWithFastFinality(current *types.Header, header * return f.ReorgNeeded(current, header) } + if justifiedNumber > curJustifiedNumber && header.Number.Cmp(current.Number) <= 0 { + log.Info("Chain find higher justifiedNumber", "fromHeight", current.Number, "fromHash", current.Hash(), "fromMiner", current.Coinbase, "fromJustified", curJustifiedNumber, + "toHeight", header.Number, "toHash", header.Hash(), "toMiner", header.Coinbase, "toJustified", justifiedNumber) + } return justifiedNumber > curJustifiedNumber, nil }