Fix possible panic.

pull/4389/head
frozen 2 years ago committed by Casey Gardiner
parent 8c2ff803f7
commit 1a70d5eb66
  1. 4
      core/blockchain_stub.go
  2. 2
      core/epochchain.go

@ -141,10 +141,6 @@ func (a Stub) Config() *params.ChainConfig {
return nil return nil
} }
func (a Stub) Engine() engine.Engine {
return nil
}
func (a Stub) SubscribeRemovedLogsEvent(ch chan<- RemovedLogsEvent) event.Subscription { func (a Stub) SubscribeRemovedLogsEvent(ch chan<- RemovedLogsEvent) event.Subscription {
return nil return nil
} }

@ -128,7 +128,7 @@ func (bc *EpochChain) InsertChain(blocks types.Blocks, _ bool) (int, error) {
} }
// Signature validation. // Signature validation.
err = bc.Engine().VerifyHeaderSignature(bc, block.Header(), sig, bitmap) err = chain.Engine().VerifyHeaderSignature(bc, block.Header(), sig, bitmap)
if err != nil { if err != nil {
return i, errors.Wrap(err, "failed signature validation") return i, errors.Wrap(err, "failed signature validation")
} }

Loading…
Cancel
Save