diff options
-rw-r--r-- | core/headerchain.go | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/core/headerchain.go b/core/headerchain.go index 61822210c..0c2000064 100644 --- a/core/headerchain.go +++ b/core/headerchain.go @@ -519,13 +519,20 @@ func (hc *HeaderChain) verifyDexonHeader(header *types.Header, } gs := gov.GetStateForConfigAtRound(header.Round) - node, err := gs.GetNodeByID(coreBlock.ProposerID) - if err != nil { - return err - } - if header.Coinbase != node.Owner { - return fmt.Errorf("coinbase mismatch") + if coreBlock.IsEmpty() { + if header.Coinbase != (common.Address{}) { + return fmt.Errorf("coinbase should be nil for empty block") + } + } else { + node, err := gs.GetNodeByID(coreBlock.ProposerID) + if err != nil { + return err + } + + if header.Coinbase != node.Owner { + return fmt.Errorf("coinbase mismatch") + } } if header.Time != uint64(coreBlock.Finalization.Timestamp.UnixNano()/1000000) { |