|
|
@ -125,6 +125,9 @@ func (v *BlockValidator) ValidateState(block *types.Block, statedb *state.DB, re |
|
|
|
// given engine. Verifying the seal may be done optionally here, or explicitly
|
|
|
|
// given engine. Verifying the seal may be done optionally here, or explicitly
|
|
|
|
// via the VerifySeal method.
|
|
|
|
// via the VerifySeal method.
|
|
|
|
func (v *BlockValidator) ValidateHeader(block *types.Block, seal bool) error { |
|
|
|
func (v *BlockValidator) ValidateHeader(block *types.Block, seal bool) error { |
|
|
|
|
|
|
|
if block == nil { |
|
|
|
|
|
|
|
return errors.New("block is nil") |
|
|
|
|
|
|
|
} |
|
|
|
if h := block.Header(); h != nil { |
|
|
|
if h := block.Header(); h != nil { |
|
|
|
return v.engine.VerifyHeader(v.bc, h, true) |
|
|
|
return v.engine.VerifyHeader(v.bc, h, true) |
|
|
|
} |
|
|
|
} |
|
|
|