diff --git a/consensus/XDPoS/XDPoS.go b/consensus/XDPoS/XDPoS.go index 282f179782..562b3cb770 100644 --- a/consensus/XDPoS/XDPoS.go +++ b/consensus/XDPoS/XDPoS.go @@ -977,7 +977,13 @@ func (c *XDPoS) Seal(chain consensus.ChainReader, block *types.Block, stop <-cha return nil, err } copy(header.Extra[len(header.Extra)-extraSeal:], sighash) - + m2, err := c.GetValidator(signer, chain, header) + if err != nil { + return nil, fmt.Errorf("can't get block validator: %v", err) + } + if m2 == signer { + header.Validator = sighash + } return block.WithSeal(header), nil }