From ded4e0fd90b89f441bd4cdbaae9b71820af741c1 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Wed, 22 Nov 2023 16:14:46 +0800 Subject: [PATCH] fix nil Error in func reportBlock (#369) --- core/blockchain.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/blockchain.go b/core/blockchain.go index 7c9c7c228cf6..4dd96a00e0ac 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -2346,7 +2346,11 @@ func (bc *BlockChain) reportBlock(block *types.Block, receipts types.Receipts, e var roundNumber = types.Round(0) engine, ok := bc.Engine().(*XDPoS.XDPoS) if ok { + var err error roundNumber, err = engine.EngineV2.GetRoundNumber(block.Header()) + if err != nil { + log.Error("reportBlock", "GetRoundNumber", err) + } } var receiptString string