fix nil pointer crash

Signed-off-by: Leo Chen <leo@harmony.one>
pull/3091/head
Leo Chen 5 years ago
parent afd2e4f63b
commit 83dc18e7f1
  1. 3
      internal/chain/engine.go

@ -172,6 +172,9 @@ func (e *engineImpl) VerifySeal(chain engine.ChainReader, header *block.Header)
if chain.CurrentHeader().Number().Uint64() <= uint64(1) {
return nil
}
if header == nil {
return errors.New("[VerifySeal] nil block header")
}
publicKeys, err := ReadPublicKeysFromLastBlock(chain, header)
if err != nil {

Loading…
Cancel
Save